Skip to main content
Solved

Parse JSON list problem

  • February 18, 2015
  • 1 reply
  • 14 views

Forum|alt.badge.img
Hi,

 

 

I cant achieve to to parse correctly json elements and attributes correctly. The json received is like this:

 

  
 {   "elements": [ {   "type": "way",   "id": 98815885,   "nodes": [     3325506694,     3325506698,     3325506701,     3325506705,   ], }, {   "type": "way",   "id": 98815895,   "nodes": [     1142949510,     1142941660,     1142983536,   ] } ] }
 

 

I am using the JSONFlattener, then the AttributesExposer (with elements{}, elements{},nodes{}, elements{}.id and elements{}.type) and finally the listExploder on elements{}.

 

 

The number of parsed feature is correct but there is no data inside the nodes attributes of each features. It's like if elements{}.nodes was empty for each feature.

Best answer by jdh

I would use a JSONFragmenter

 

 

incidentally your posted json has trailing commas after the last value in an object or array
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • Best Answer
  • February 18, 2015
I would use a JSONFragmenter

 

 

incidentally your posted json has trailing commas after the last value in an object or array