[Opensim-dev] JSON or XML for serialization in the OpenSim database?

BlueWall Slade bluewall.slade at gmail.com
Mon Jul 5 16:24:31 UTC 2010


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.

++ on OSD/JSON

BlueWall

On Sun, Jul 4, 2010 at 8:28 PM, Justin Clark-Casey <jjustincc at gmail.com>wrote:

> Hi folks,
>
> 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.
>
> 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.
>
> 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.
>
> 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.
>
> 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.
>
> 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.
>
> Regards,
>
> --
> Justin Clark-Casey (justincc)
> http://justincc.org
> http://twitter.com/justincc
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20100705/bb5818a0/attachment-0001.html>


More information about the Opensim-dev mailing list