• Post Reply Bookmark Topic Watch Topic
  • New Topic

parsing a json recursively and get count of children along with parent child relationship  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

I have a json of the below format:

type1{
categories:
type1{
categories:
type1{}
type2{}
}
type1{
categories:
type1{
categories:
type1{
categories:
type1{}
type2{}
}
type2{}
}
type2{}
}


I have done code to parse this json after defining classes for above json structure

Now I am trying to get count of articles of type1 at each level.

say for example at level1: there are 2 type 1 articles but first type1 child has children type1 and type2

at level2: type1 has children 3 levels further

I am trying with collections but I am held. Could you help me with the logic

Thanks in advance





 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!