docs(readme): simplify phrase in "Wrappers"
This commit is contained in:
parent
cc88c5c79e
commit
ab727c2cf4
20
README.md
20
README.md
|
@ -101,16 +101,16 @@ string the result of the conversion is written to the standard output.
|
|||
The arguments `--wrap` and `--unwrap` are there to solve the problem of
|
||||
converting CBOR, JSON, MessagePack, and YAML data to TOML if the top-level
|
||||
element of that data is not of a dictionary type (i.e., not a map in CBOR and
|
||||
MessagePack, an object in JSON, or an associative array in YAML) but a list,
|
||||
a string, or a number. Such data can not be represented as TOML directly; it
|
||||
must be wrapped in a dictionary first. Passing the flag `--wrap someKey` to
|
||||
`remarshal` or one of its short commands wraps the input data in a "wrapper"
|
||||
dictionary with one key, "someKey", with the input data as its value.
|
||||
The flag `--unwrap someKey` does the opposite: if it is specified only
|
||||
the value stored under the key "someKey" in the top-level dictionary
|
||||
element of the input data is converted to the target format and output; all
|
||||
other data is ignored. If the top-level element is not a dictionary or does not
|
||||
have the key "someKey" then `--unwrap someKey` returns an error.
|
||||
MessagePack, an object in JSON, or an associative array in YAML).
|
||||
Such data can not be represented as TOML directly; it must be wrapped in a
|
||||
dictionary first. Passing the flag `--wrap someKey` to `remarshal` or one of
|
||||
its short commands wraps the input data in a "wrapper" dictionary with one key,
|
||||
"someKey", with the input data as its value. The flag `--unwrap someKey` does
|
||||
the opposite: if it is specified only the value stored under the key "someKey"
|
||||
in the top-level dictionary element of the input data is converted to the
|
||||
target format and output; all other data is ignored. If the top-level element
|
||||
is not a dictionary or does not have the key "someKey" then `--unwrap someKey`
|
||||
returns an error.
|
||||
|
||||
The following shell transcript demonstrates the problem and how `--wrap` and
|
||||
`--unwrap` solve it:
|
||||
|
|
Loading…
Reference in New Issue