Dave Barnes created GEODE-6952:
----------------------------------
Summary: Documented examples on using JSON in the User's Guide are
not correct
Key: GEODE-6952
URL: https://issues.apache.org/jira/browse/GEODE-6952
Project: Geode
Issue Type: Bug
Components: docs
Reporter: Dave Barnes
[~tjeppesen] reports:
In the User’s Guide
([https://geode.apache.org/docs/guide/19/tools_modules/gfsh/command-pages/put.html])
it says:
_--key
Required. String or JSON text from which to create the key. For example:
“James”, “100L” and “('id': 'l34s')”.
--value
Required. String or JSON text from which to create the value. For example:
“James”, “100L” and “('id': 'l34s')”. _
But in the example commands it uses:
_put --key=('id':'133abg125')
--value=('firstname':'James','lastname':'Gosling')
--region=/region1 --key-class=data.ProfileKey --value-class=data.ProfileDetails_
So no “” around the JSON.
If I do that in GFSH I get an error:
_gfsh>put --region=/CashflowGroupMap --key=('c1':'Hello World')
--value=('c2':'XXXXTest') --key-class=java.lang.String
--value-class=java.lang.String
Option '' is not available for this command. Use tab assist or the "help"
command to see the legal options_
With the “” around the result looks right with {} around the key:
_gfsh>put --region=/CashflowGroupMap --key="('c1':'Hello World')"
--value="('c2':'XXXXTest')"
Result : true
Key Class : java.lang.String
Key : \{'c1':'Hello World'}
Value Class : java.lang.String
Old Value : null_
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)