better json encoding (minor)

Minor Update.