You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are my comments to the patch: very good idea to abstract the details of how the sequence is read but unfortunately the way it is implemented it is too intrusive for the existing consumers of JsonObject/JsonArray.
Let me suggest a minor improvement to your patch, the idea stays the same but we will keep the existing code intact.
You've introduced JsonTokenerAbstract as the base 'interface'. Instead we should have an actual interface introduced, say 'JsonTokenerProvider'. Next you have your JsonTokenerAbstract implementing JsonTokenerProvider, where JsonTokenerProvider has the methods which are currently marked as abstract in JsonTokenerAbstract.
Introduce two JsonTokenerProvider interface implementations, both indeed extending JsonTokenerAbstract: one would use the existing String based JsonTokener, the other one would be a Reader based.
Add new constructors to JsonObject/etc accepting JsonTokenerProvider interface and Reader.
update existing constructors accepting JsonTokener by wrapping it into one of JsonTokenerProvider implementations and delegating to the constructor accepting JsonTokenerProvider. Similarly for new constructors accepting Reader.
The text was updated successfully, but these errors were encountered:
Here are my comments to the patch: very good idea to abstract the details of how the sequence is read but unfortunately the way it is implemented it is too intrusive for the existing consumers of JsonObject/JsonArray.
Let me suggest a minor improvement to your patch, the idea stays the same but we will keep the existing code intact.
The text was updated successfully, but these errors were encountered: