Boost logo

Boost :

Subject: [boost] [boost/property_tree/json_parser] - Consuming a Json file returning from rest web service
From: Demetrio Car (demetrio.pepi_at_[hidden])
Date: 2011-08-31 08:12:54


>
> Could someone send me an example of how to use json_parser to read a Json
> file? I will need to consume a Rest web service developed in Rails. This web
> service will respond to my code using json, in other words, from my C++ code
> running over linux I will access an url which will return to me a file in
> Json format. The main point is: how do I access the url
> http://my_gienah:3000/dominios/dominiosAll.json> or
> the url
>
http://my_gienah:3000/Tipoestruturas/ObtemTipoEstrutura_IdDominio/1.json> .In
> the last url, I must set parameters. The return is something like this:
>
> [{"DscDominio":"Johnson Argentina"},{"DscDominio":"Johnson Brasil"},{"DscDominio":"Farmoqu\u00edmica"},{"DscDominio":"Dom\u00ednio Inativo"},{"DscDominio":"NIKKHO"},{"DscDominio":"teste"},{"DscDominio":"Dominio"},{"DscDominio":"teste"},{"DscDominio":"teste"},{"DscDominio":"Teste"},{"DscDominio":"Teste"},{"DscDominio":"Dom"},{"DscDominio":"teste"},{"DscDominio":"teste"},{"DscDominio":"Teste"},{"DscDominio":"descricao"},{"DscDominio":"DesccricaoTeste"},{"DscDominio":"teste"},{"DscDominio":"teste p"},{"DscDominio":"teste p 2"},{"DscDominio":"teste p 3"},{"DscDominio":"Teste Dominio Produto x"},{"DscDominio":"Teste Dominio Produto x"},{"DscDominio":"Teste Dominio Produto x"},{"DscDominio":"Dominio Produto 123"},{"DscDominio":"subdom2"},{"DscDominio":"teste"},{"DscDominio":"2"},{"DscDominio":"3d"},{"DscDominio":"X"}]
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk