This post triggered a discussion between András and me about how to best handle arbitrarily-shaped JSON in WebSharper.Json, which I summarized in these two GitHub issues where you're welcome to participate:

Right, we don't really have a consistent story for the obj type. On the server it throws an exception, whereas on the client it doesn't throw but it returns a fairly useless empty object value (basically the result of calling the client-side constructor for obj). That's clearly not a good state of affairs.

I'm not quite sure what would be an expected behavior though, but I think it's a good discussion to open.

I guess the client should just return the value as is. But what about the server, how should it handle the different shapes it could encounter? Should it always treat numbers as float, or return int if it can parse it as one? Should it translate arrays to obj[] and objects to Dictionary<string,obj>?