NaN in JSON

RouterGuy
Here to help

NaN in JSON

For wifi observer responses the fields lat, lng, x and y are typed as floats (decimals), but they are returning NaN in certain cases. NaN isn’t valid JSON (https://tools.ietf.org/html/rfc8259 sec 6) and should probably be changed to null.  Not a big deal but obviously causes an exception which has to be handled if you’ve typed the field to float in the class you deserialize into. 

 

Thanks

1 Reply 1
DexterLaBora
Meraki Employee
Meraki Employee

I'm assuming you are referring to the output in Scanning API v2. 

I would suggest using the new Scanning API v3, which fixes a number of issues with the type and values.

The new version also is much more efficient and accurate. 

 

https://developer.cisco.com/meraki/scanning-api/#!3-0/observation-payloads

 

 

Get notified when there are additional replies to this discussion.