Open tx0c opened 2 years ago
Hey @tx0c, thanks for the suggestion! This needs a bit more work than just adding another check, since we want to be backwards compatible and warn our users in case of they are sending wrong JSON objects (even though those might be valid in JSON5). We need some product design first, in order to asses how we want to proceed (e.g a new --json5
flag, accompaniying the existing --json
).
Checklist
Enhancement request
trying to call httpie with post body including raw valid js objects,
got error:
as expected;
but always expected tools like
httpie
could/should accept more format for flexibility,and there is a project for that, called JSON5 (https://json5.org/) JSON for Humans, it allows many features, and some would be most useful for
httpie
:metrics:='[{name: "activeUsers"}]'
hopehttpie
can recognize it and auto-translate to valid json,1e3
28e6
?Additional information, screenshots, or code examples
JSON5 Python libraries: