commit | 67028755ca66fcebad05826c462e54c84248ad3a | [log] [tgz] |
---|---|---|
author | Christopher Collins <ccollins@apache.org> | Mon Nov 11 09:37:15 2019 -0800 |
committer | ccollins476ad <ccollins476ad@gmail.com> | Wed Nov 13 12:57:00 2019 -0800 |
tree | f2c29bdd6f1bc7f1e72f0298a3a5e3b488792b06 | |
parent | e4f5cd505bb1d6fca2a01058291318700081db68 [diff] |
res: Add `--int` option to parse numbers as ints 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 commit 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.
Newt Manager (newtmgr) is the application tool that enables a user to communicate with and manage remote devices running the Mynewt OS. It uses a connection profile to establish a connection with a device and sends command requests to the device. The newtmgr tool documentation can be found under /docs which are published at http://mynewt.apache.org/latest/os/modules/devmgmt/newtmgr.html
Build the newtmgr tool as follows:
apache-mynewt-newtmgr-1.3.0
directory to $GOPATH/src/mynewt.apache.org/newtmgr
cd $GOPATH/src/mynewt.apache.org/newtmgr/newtmgr
GO111MODULE=on go build