On 01.09.2014 18:27, Fredo Erxleben wrote:
On 01.09.2014 17:06, Jeroen De Dauw wrote:
Hey,
We will hopefully soon switch to our new implementation of the
serialization code. I had a quick look and it seems to have the same
issue
though. I filed a ticket for that here:
https://github.com/wmde/WikibaseDataModelSerialization/issues/77
This would be the right way to do this, but the problem is that in
php, an
> empty
> map is indistinguishable from an empty list. So how do we tell the json
> encoder
> when to use what?
This "language" never ceases to "amaze"
me.
<Obligatory PHP rant>
Cast the array to object.
Nope. Java uses type ereasure. When reading as a simple
Object, all type
information get lost and even casting them back only results into what
the Json deserializer sees: some map with bunches of strings in it. All
intermediate type information (which we have because OOP) get lost in
the process.
That answer was referring to the PHP side of things ;-) But still
interesting.
So, I will implement a workaround, but this should get fixed, since it
negates all performance gains we have by employing an advanced Json parser.
Yes, I have been worried about this too.
Markus
Geronimo,
Fredo
_______________________________________________
Wikidata-tech mailing list
Wikidata-tech(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech