added rfc4627 support (json)