prabhu pandurangan wrote:Let me know how i can implement this in java with high performance and scalability.
I'm afraid I'm no JSON expert, but one thing I will suggest: Get the implementation right first;
then worry about performance and scalability.
However, looking at the structure, It would appear to be a set of Nodes, each of which contains a list of Labels, each of which contains a list of Items, each of which contains a list of IP descriptors. Now you say that each IP might contain a list of descriptions, but I don't see any evidence of that from what you've shown us - on the contrary: each IP would appear to have only ONE description.
So, you would appear to have four types:
Node,
Label,
Item and
IP (or
IPDescriptor).
I'm afraid I'm not familiar enough with the various brackets (
[]) and braces (
{}) in JSON to know exactly what they mean though - the braces seem to denote a "list" of some kind, but whether it's a
List (java.util.List), a
Set (java.util.Set), or a
Map (java.util.Map), I simply don't know; and the choice could be important.
Hope it helps (as far as it goes).
Winston
[Edit] One thought occurred to me: Presumably, these JSON objects came from somewhere; why not look at the classes/objects that produced them?