-1

Please help me to parse below JSON string Using XStream and JettisonMappedXmlDriver In Java ??

   [{
       "uuid": "{empid}",
       "attributes": {
             "name": "Prem",
             "surname": "Nath",
             "year": 1965
            },
      "relationships": {
              "ONE_TO_MANY": {
                     "cars": "{object_name}/{empid}/cars"
                             }
                         }
        }
    ] 
Anand K Nair
  • 597
  • 1
  • 6
  • 18
  • In this json am not getting "ONE_TO_MANY": {"cars": "{object_name}/{empid}/cars"} Is it a property of Json or simple string – Anand K Nair Jul 30 '13 at 12:52
  • I don't understand what you mean. –  Jul 30 '13 at 12:53
  • Means in that ONE_TO_MANY tag, one car tag is there. You can see that the values of cars is {object_name}/{empid}/cars.So my doubt is this ONE_TO_MANY is a property of Json like in set ie, more than one values can be come in that field, Kind of arraylist or something. If it is like repeating values then how i can map it using Xstream – Anand K Nair Jul 30 '13 at 12:58
  • 1
    This `ONE_TO_MANY` has no special meaning. It is just a name. Perhaps read up on [the syntax of JSON](http://json.org/). –  Jul 30 '13 at 13:03

1 Answers1

1

Your JSON is not valid. The second to last line contains a , that doesn't belong there.