Author Topic: Illegal Characters in Module information? Lesson Learned!  (Read 743 times)

cbristow

  • Newbie
  • *
  • Posts: 3
Illegal Characters in Module information? Lesson Learned!
« on: August 19, 2010, 02:50:56 PM »
All,

Just spent a week or so trying to figure out why I couldn't seem to parse data properly from a JSON query....  Turns out I had used a comma in the 'Location description' field of my module,  in the format of "Warminster PA USA"

and, I had copied the google earth coordinates for latitude and longitude using cut and paste, which look like
 40°10'53.54"N
 75° 5'1.28"W

this made my module report the following when using a JSON query...

"module": {
            "serial": "My Serial Number",
            "label": "Module My Serial Number",
            "lat": " 40°10'53.54"N",
            "long": " 75° 5'1.28"W",
            "location": "Warminster, PA USA",
            "datetime": "2010-08-19 18:46:34",
            "status": "Online",
            "channels": [
            {"channel": "1", "label":


Note the comma in the Location field, and the  "# & 39' being inserted for the degree symbol...

Anyway, after a lot of troubleshooting, I changed out all of those annoying characters, and things got better.




iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Illegal Characters in Module information? Lesson Learned!
« Reply #1 on: August 19, 2010, 03:02:51 PM »
If you still want to have your Lat/Long programmed in, you can use Decimal Degrees. Decimal degrees are the best way to represent Lat/Long since they do not have special characters. ex "42.19783"

The comma in the location is odd. I will check to see if that throws it off. I wonder of the lat and long caused the issue and the comma was an innocent bystander.

Thanks for posting your results.



ioBridge Support
Community Team