I'm generally not in favor of bit fields. they are too hard to extend. two
alternatives that might work based on the idea that there are really two
pieces of information we want to convey... the type of the JSON node (null,
object/hash, array, value) and the type of value in a value node.

0) take the OSD approach and just return the type of the node/value (which
is where I had planned to end up), null is 0, hash/object is 1, array is 2,
value is anything greater than 2, string is 3, integer 4, etc...

1) partition the return into a node type and value type. use the bottom
three bits for node type and the rest for the value type if the node is a
value node; this at least provides some space for future extensibility

2) split the operations into two.. JsonGetNodeType() and JsonGetValueType()

--mic


On Mon, Feb 18, 2013 at 5:02 PM, Justin Clark-Casey <
[email protected]> wrote:

> Hi Mic.  One small thing in case I don't catch you on IRC - could we
> change the Json node types to be independently flaggable values rather than
> 0, 1, 2, 3 as they are at the moment?  That way, one would be able to more
> easily flag a node as both Value and String in the future, for example.
>
> --
> Justin Clark-Casey (justincc)
> OSVW Consulting
> http://justincc.org
> http://twitter.com/justincc
> ______________________________**_________________
> Opensim-dev mailing list
> [email protected]
> https://lists.berlios.de/**mailman/listinfo/opensim-dev<https://lists.berlios.de/mailman/listinfo/opensim-dev>
>
_______________________________________________
Opensim-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-dev

Reply via email to