JsonReader.AsString returns nothing

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 :slight_smile:

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 :slight_smile:

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.