Json improvements: Use perfect forwarding.

And simplify rvalue reference protocol.
Add some json tests.
Nit.