Re: [Vala] Json.Searializable implementation troubles
- From: Daniel Espinosa <esodan gmail com>
- To: Luc Chante <luc chante gmail com>
- Cc: Vala-list <vala-list gnome org>
- Subject: Re: [Vala] Json.Searializable implementation troubles
- Date: Mon, 10 Aug 2015 08:06:14 -0500
2015-08-10 0:48 GMT-05:00 Luc Chante <luc chante gmail com>:
Hi,
I don't clearly understand what you want. You are looking for maintainers
for GXml ?
No really.
But, why should I use GXml for JSON serialization ?
May you want to study GXml.Serializable implementation called
SerializableObjectModel, in order to check how:
a) access GObject properties
b) "ignore" some of them when they should not be serialized
c) manage "unknown" nodes (representing properties, values and so), in
order to not fail but get all "know" values into your GObject instance
d) use Gee collections on Serializable objects
GXml have a SerializableJson implementation, it is not really JSON, but it
is called that way. It have not maintener and should be removed from GXml
soon, unless you want to re-implement it to use GLib.Json.
May you want to implement GXml.Serializable, for your own in your project.
Point here, you can simply study GXml.Serializable or step up to implement
a new JSON in GXml. In both cases, I could help you if you want.
Cheers.
Le sam. 8 août 2015 à 13:06, Daniel Espinosa <esodan gmail com> a écrit :
In GXml [1] we access to GObject properties, serialize /deserialize,
'select' witch property to avoid in serialization, use a concept of Node
and more, may you can review.
GXml is for xml documents, but it has an implementation it is not for
Json, even if it is not really Json string representation. May you want to
improve that to use GLib Json, implementing GXml.Serializable interface and
learn how to access properties by studying the ObjectModel implementation
(is a .Net like xml serialization to map GObject to xml). If you, or any
other don't take GXml's Json maintenance I will have to remove it, because
it needs to be rewritten. Even though I can help you any time.
[1] git.gnome.org/browse/gxml
El ago. 8, 2015 3:16 AM, "Abderrahim Kitouni" <a kitouni gmail com>
escribió:
Hello Luc,
Le 8 août 2015 06:39, "Luc Chante" <luc chante gmail com> a écrit :
Hi,
I'm trying to implement Json.Serializable interface.
For the moment, I've just made a lazy implementation (see the attached
file), which mocks default behavior of Glib.Object serialization.
To test :
[...]
There is 2 issues :
The 'list_properties' is never called (it doesn't override the base
one).
You are using the "new" keyword, which means it's a new method (unrelated
to any method with the same name in a base class or interface). For
implementing an abstract method, you don't need any modifier; for
overriding a virtual method, use "override"
I'm not sure about the rest, I never used it.
HTH,
Abderrahim
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list
--
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los
cuates: LIBRE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]