[json-lib-user] Proposal to add the isNullObject method into JSON interface
Brought to you by:
aalmiray
From: Philippe A. <fut...@gm...> - 2009-10-30 17:36:43
|
Hello! I would like to propose adding the isNullObject method into the JSON interface. The current way to determine if an object is null is by comparing the result of toString with the "null" string. This is the only method common to NULLObject and JSONObject allowing to do that. It works but it is not as efficient as isNullObject since time must be spent building a string representation of the object if it is not null. Besides adding the declaration in the JSON interface, it would be only a matter of implementing a function returning true in JSONNull. Obviously it would break compatibility for those who implemented the JSON interface for other purposes. Let me know what you think. |