Pregunta

I'm trying to implement some methods of a http POST based API. The problem is that I'm not really familiar with the format of the requests and replies. I don't know if its a standard format, that perhaps my apache httpclient can parse for me, or if I have to do it myself. Basically it looks like this:

{
 "key": value,
 "parent": [
  {
    "child1key1": child1value1,
    "child1key2": child1value2,
  },
  {
    "child2key1": child2value1,
    "child2key2": child2value2,
  }
 ]
}

What is this format? How do I parse it? I mean I could write a parser myself but I'm assuming I don't really have to. Also, the request expects the same format, so I would need to be able to build requests on this format as well.

¿Fue útil?

Solución

This is JSON, JavaScript Object Notation.

There is a lot of json parser for java, i can suggest to you GSON

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top