Re: [Vala] jSON parser
- From: "marcin saepia net" <marcin saepia net>
- To: vala-list gnome org
- Subject: Re: [Vala] jSON parser
- Date: Thu, 15 Mar 2012 13:36:17 +0100
Message: 2
Date: Wed, 14 Mar 2012 13:25:38 -0500
From: "Luis L. Rodr?guez Oro" <luisr uci cu>
To: vala-list gnome org
Subject: [Vala] jSON parser
Message-ID: <4F60E2A2 5010606 uci cu>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
in this examples Im parse a JSON:
{"data":50} // JSON
var parser = new Json.Parser ();
parser.load_from_file ("cuota.json");
var root_object = parser.get_root ().get_object ();
stdout.printf ("data: %d\n", root_object.get_int_member ("data"));
// work perfect!!!!!
{"data":50.65} // jSON
stdout.printf ("data: %d\n", root_object.get_int_member ("data"));
// dont work!
I cant control the value. ?How get variant type data?
Try parser.get_root().type_name()
m.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]