ccollins476ad opened a new pull request #149: res: When `-j` is specified, allow all value types URL: https://github.com/apache/mynewt-newtmgr/pull/149 Prior to this PR, `res -j` would only accept a `map[string]interface{}` as the payload. Now, it accepts an `interface{}`. This allows the payload to consist of a number, a string, or an array (or an object, as before). Also: JSON only supports a single numeric type: "number". When the `res -j` command parses a payload, the JSON unmarshal function parses all numbers as instances of float64. This makes the resulting CBOR payload incorrect when the user just wants to use integers. This PR adds an option to the res command: `--int`. When specified, all numbers in the payload are converted to integers when the conversion does not result in a change in value. For example, `1.0` is converted to an integer, but `1.5` is not.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
