I use OSDMap / json exclusively in projects. Encoders and decoders for python and php work very well, and it is very easy to work with inside the region modules. Very clean and efficient, overall. Since we have OSDMap and friends to help on the OpenSim side, I think it would makes sense to consider it.<br>
<br>++ on OSD/JSON <br><br>BlueWall<br><br><div class="gmail_quote">On Sun, Jul 4, 2010 at 8:28 PM, Justin Clark-Casey <span dir="ltr"><<a href="mailto:jjustincc@gmail.com">jjustincc@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi folks,<br>
<br>
As part of the media-on-a-prim implementation, I'm serializing the parameters for a media texture to the database. This seems better than creating new database fields or even a whole new table for these parameters, both because there are lots of them (url, scaling, controls, whitelist, etc.) and because different future virtual environments may want to store different things.<br>
<br>
I'm going to serialize them as an OSDArray or MediaEntrys using the libopenmetaverse library. However, the question then becomes whether to use the JSON representation or the XML representation.<br>
<br>
I tend to prefer XML for storage representations. I believe that it's somewhat more human readable and that there is better tool support for manipulating it. However, I know other people would prefer storage in JSON and I accept that serialization/deserialization there may be slightly faster.<br>
<br>
The only other example of serialization that I know of in OpenSim currently is that of SceneObjectGroups into inventory, which encompasses object properties, object inventory properties and script state. This is done in XML and media entries would become part of that serialization.<br>
<br>
If there's a majority preference for JSON I don't mind using that instead, though I would want a justification for going this route rather than XML. If there's no real argument then I will go with XML.<br>
<br>
Also, I believe that we should try and be consistent, so picking one or the other now should make it more likely that the same approach would be used for the next serialization case.<br>
<br>
Regards,<br><font color="#888888">
<br>
-- <br>
Justin Clark-Casey (justincc)<br>
<a href="http://justincc.org" target="_blank">http://justincc.org</a><br>
<a href="http://twitter.com/justincc" target="_blank">http://twitter.com/justincc</a><br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de" target="_blank">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</font></blockquote></div><br>