[haiku-depot-web] Re: Update w/ Categories, Version Views and Better Search

  • From: Andrew Lindesay <apl@xxxxxxxxxxxxxx>
  • To: haiku-depot-web@xxxxxxxxxxxxx
  • Date: Tue, 25 Mar 2014 22:50:15 +1300

Hi Stephan;

Thank you for the kind words; I think it is working well. I'm glad to hear the Haiku Network API is getting some polish too.

I am presently doing some work on localisation setup. Time permitting, I should be able to push some of that material later in the week.

You are right that JSON generation and parsing is quite easy to implement; some years ago I wrote one in another language. Beyond the basic JSON serialisation there are downstream infrastructural complications around marshalling model objects and that has the potential to get quite complex.

The library used in the JSON-RPC element on the HDS application server _should_ be able to automatically produce this stuff from the model objects used in the API;


I wonder if that could be _somehow_ parsed and turned into C++ model objects (stubs) that can be easily serialized / deserialized. This may help to speed-up the client communication implementation and make it somewhat type-safe. I see that this C/C++ library below has some support for validation based on those schema;


It does not look like it does stub-generation though. :-/

Have you see any other C/C++ side libraries that might support this _sort_ of thing?


On 25/03/14 11:30 am, Stephan Aßmus wrote:
With the work on the Haiku network API for WebPositive making it really easy to 
connect to the server, the only question mark remaining is the JSON 
implementation. I've looked at existing libraries, and there are really many of 
them, just for C++ and C alone. I am still wondering whether I should bother 
with porting something. While there might be pit-falls with JSON that can be 
avoided by using something mature and proven, the format does seem quite simple 
and I don't want to implement something usable by all, but something which 
targets a specific server only. Also, converting to/from BMessages seems the 
obvious way to go. I'll see.

Andrew Lindesay

Other related posts: