I'm not sure it could, if I have a resource with a URL:
www.example.com/foo
and it can arbitary sub-resources e.g.
www.example.com/foo/bar/raz
then how do I know whether bar is a different resource or part of the JSON returned describing www.example.com/foo
This would mean you'd have to restrict your resource names to ensure they don't clash with JSON names - which seems a pain (e.g. say the resource names are uploaded files and directories, so you won't have much control over what they are called)