In the following MWE
echo x="1e2" | mlr --ojson cat
my intention is for miller to generate a one-element JSON array containing the object
{"x": "1e2"}
The object actually returned (within the array) is instead
{"x": 1e2}
where the value is taken as a number, I guess that as a consequence of its parsing. How can I tell miller to generate the JSON object with a string for its value rather than a number? (The rationale underlying the quotation marks around '1e2' in the MWE is precisely to highlight this intention.)
Asked by Marcos
(103 rep)
Jul 31, 2023, 02:35 AM
Last activity: Aug 25, 2023, 07:27 PM
Last activity: Aug 25, 2023, 07:27 PM