Actually I thought toJSONString method is required to provide correct way of creating JSONObject from bean. In this case I see no reason why we should scan bean itself ....
On Sat, Apr 22, 2017 at 9:04 PM, Sebastien <[email protected]> wrote: > Hi Maxim, > > Actually there was 2 questions, that's why it was not clear :) > > 1/ About how to handle the stack overflow. I saw here [1] that you handle > "instanceof JSONString" in the ctor. My question was about the accuracy of > this. Should it be handled in the ctor like this, or should it be handled > in the toString method. I prefer the second method because new > JSONObject(bean) should handle real bean properties, not the properties > that may have been set manually in toJSONString > > 2/ API break about renaming package or method signature changes is one > thing. Silent breaks are something else. If it is documented, that's fine. > But if it can be avoided and keep compatibility... that's better IMO :) > > Thanks :) > Sebastien. > > [1] > https://github.com/openjson/openjson/commit/d2367f28cebd8f21c4a4e22faec4ca > b2f8a95982#diff-d1df85e7c46815227f1dcb2b4b08ab33R204 > -- WBR Maxim aka solomax
