Skip to content

Avoid language that seems to attempt to modify JSON parsing behavior #1284

Closed
@handrews

Description

@handrews

This discussion on the IETF JSON mailing list brought up that this language in §6.3 Mathematical Integers is problematic:

For consistency, integer JSON numbers SHOULD NOT be encoded with a fractional part.

It appears to impose a normative (SHOULD NOT) requirement on JSON parsers, which is not something we can do.

I think that the intent of this was to guide users of JSON Schema to write integers (both in JSON data and in JSON Schema keyword values) as 1 rather than 1.0, as doing so maximizes the chances that a JSON parser will store the value as an integer rather than a float in an environment that makes such distinctions.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions