Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[golo-dev] PR Proposal (2 questions)

Hey people

I have a PR in my bag: 
we have toDynamicObject in the JSON package (json string to DynamicObject) that works with only the first-level entry.

I would like to propose "toDynamicObjectTree" and "toDynamicObjectTreeFromString" that will work with all levels, eg with this kind of string:

 let bob = """

  {

    "id": "bob_morane", "firstName": "Bob", "lastName": "Morane",

    "things": {

      "id": "001",

      "message": {

        "text": "this is a box"

      },

      "bidules": [

        42,

        "42",

        {

          "trucs":[

            1,

            2,

            3,

            {

              "tools": [

                "hammer",

                "fork",

                "knife",

                {

                  "yo":"HELLO"

                }

              ]

            }

          ]

        }

      ],

      "id": "ping"

    },

    "remark": "nothing"

  }

  """

toDynamicObjectTree return a dynamicObject from a JSONObject or a JSONArray
toDynamicObjectTreeFromString return a dynamicObject from a JSON String

As explained in the RiGolo project https://github.com/yloiseau/rigolo/blob/b6853b1728abf4988ada40f32f4dd68704ab863c/RiGolo/rigolo-0001.adoc#rigolo-or-issue

Question 1: Can I considerate my PR as a small enhancement?

Question 2: about small enhancements

IMHO, about small enhancement or fix proposals, we don't need issue: people can open a new PR with a few lines of code (or a few lines of doc or test) and they explain the object of the enhancement (or fix) in the PR. Then somebody can review it and see from the beginning if it's interesting or not. What do you think? (if compliant with the flow of the Golo project)

Have a nice day :)


Philippe

Back to the top