Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-6952

Documented examples on using JSON in the User's Guide are not correct

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • docs
    • None

    Description

      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_

      Attachments

        Activity

          People

            Unassigned Unassigned
            dbarnes Dave Barnes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: