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.<div>
<br></div><div>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...</div>
<div><br></div><div>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</div>
<div><br></div><div>2) split the operations into two.. JsonGetNodeType() and JsonGetValueType()</div><div><br></div><div>--mic</div><div><br><br><div class="gmail_quote">On Mon, Feb 18, 2013 at 5:02 PM, Justin Clark-Casey <span dir="ltr"><<a href="mailto:jjustincc@googlemail.com" target="_blank">jjustincc@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Justin Clark-Casey (justincc)<br>
OSVW Consulting<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>
______________________________<u></u>_________________<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/<u></u>mailman/listinfo/opensim-dev</a><br>
</font></span></blockquote></div><br></div>