Re: [Vala] Generating JSON in Vala



It looks like an interesting approach to generate immuable JSON right
from the Vala code.

You should also look into GObject serialization, which is a real
kicker. If you could generate an arbitrary Object with crafted runtime
properties, your tool would be slightly more powerful.

Json.gobject_serialize (new JSONObject ("a", JVal.Int, 2));

You could omit the type with GLib.Value and use 
http://www.valadoc.org/#!api=gobject-2.0/GLib.Object.set_property the
generate the properties.

Good luck!

Le mardi 30 juin 2015 à 23:19 +1000, Nick Watts a écrit :
A couple of days ago, someone named Grindhold sent a message asking 
about
generating JSON easily for a web app backend.  I'd been pondering for 
a
while how to do this in clean, concise way wrapping varargs around
json-glib for syntactic sugar.  Tonight I finally sat down and banged 
out a
proof of concept, which is available here:

https://github.com/unyieldinggrace/EasyJSON

Hopefully that helps Grindhold!
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
-- 
Guillaume Poirier-Morency <guillaumepoiriermorency gmail com>

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]