Json Serializer: Better encoding and documentation