Make sure you're doing something like:
var roots = {{=XML(json_list)}}
where json_list is the output of json.dumps(). And don't put any quotes
around the entire JSON string -- in Javascript, it is not a string but an
object.
Anthony
On Wednesday, June 8, 2016 at 10:41:02 PM UTC-4, Alex Glaros wrote:
>
> anyone see anything wrong with this latest output? still getting: *Uncaught
> SyntaxError: Unexpected token &*
>
> is the first quote a problem?
>
> "[{\"parentId\": 2, \"key\": 16, \"title\": \"Defense and National
> Security\"}, {\"parentId\": 2, \"key\": 4, \"title\": \"State\"},
> {\"parentId\": 2, \"key\": 5, \"title\": \"County\"}, {\"parentId\": 2,
> \"key\": 6, \"title\": \"City\"}, {\"parentId\": 2, \"key\": 11, \"title\":
> \"House of Representatives\"}, {\"parentId\": 2, \"key\": 10, \"title\":
> \"Senate\"}, {\"parentId\": 2, \"key\": 13, \"title\": \"Mission Sector
> cross reference\"}, {\"parentId\": 2, \"key\": 14, \"title\": \"Business
> Function cross reference\"}, {\"parentId\": 2, \"key\": 15, \"title\":
> \"Service cross reference\"}, {\"parentId\": 2, \"key\": 17, \"title\":
> \"National Defense\"}, {\"parentId\": 2, \"key\": 18, \"title\":
> \"Battlespace Networks\"}, {\"parentId\": 2, \"key\": 19, \"title\":
> \"Command and Control\"}, {\"parentId\": 2, \"key\": 21, \"title\":
> \"Province\"}, {\"parentId\": 2, \"key\": 22, \"title\": \"District\"},
> {\"parentId\": 2, \"key\": 23, \"title\": \"Subdistricts of Afghanistan\"},
> {\"parentId\": 2, \"key\": 26, \"title\": \"Municipality\"}, {\"parentId\":
> 2, \"key\": 25, \"title\": \"Province\"}, {\"parentId\": 2, \"key\": 34,
> \"title\": \"Suggestion\"}, {\"parentId\": 2, \"key\": 35, \"title\":
> \"Crowd Source Item\"}, {\"parentId\": 2, \"key\": 1, \"title\": \"BRM\"},
> {\"parentId\": 2, \"key\": 2, \"title\": \"DRM\"}, {\"parentId\": 2,
> \"key\": 3, \"title\": \"Federal US government\"}, {\"parentId\": 2,
> \"key\": 7, \"title\": \"Legislative Branch\"}, {\"parentId\": 2, \"key\":
> 8, \"title\": \"Executive Branch\"}, {\"parentId\": 2, \"key\": 9,
> \"title\": \"Judicial Branch\"}, {\"parentId\": 2, \"key\": 12, \"title\":
> \"BRM cross reference\"}, {\"parentId\": 2, \"key\": 20, \"title\":
> \"Council of Ministers\"}, {\"parentId\": 2, \"key\": 24, \"title\":
> \"Central Government\"}, {\"parentId\": 2, \"key\": 27, \"title\": \"DRM
> cross reference\"}, {\"parentId\": 2, \"key\": 28, \"title\": \"Party\"},
> {\"parentId\": 2, \"key\": 29, \"title\": \"Meeting Category\"},
> {\"parentId\": 2, \"key\": 30, \"title\": \"Meeting\"}, {\"parentId\": 2,
> \"key\": 31, \"title\": \"Engagement Squared Idea\"}, {\"parentId\": 2,
> \"key\": 32, \"title\": \"IT System\"}, {\"parentId\": 2, \"key\": 33,
> \"title\": \"Inventory (think I need to remove this as is more a
> classification concept)\"}]"
>
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.