Running this:
var tmp = new JsonReader("{ \"foo\": \"bar\" }");
debug_log (string)tmp;
debug_log tmp.AsString();
Nothing is printed.
It would be neat if JsonReader was able to convert back to string again
Running this:
var tmp = new JsonReader("{ \"foo\": \"bar\" }");
debug_log (string)tmp;
debug_log tmp.AsString();
Nothing is printed.
It would be neat if JsonReader was able to convert back to string again
This is sort of intended behavior. AsString
only returns a string when the object is a string. I do agree that it would be neat, but not really a bug
We have investigated our Json API a bit deeper now, and found some inconsistencies. The behaviour on failed conversions will be cleaned up in a few weeks. In particular, the third line in your example should have thrown an exception.