quixadhal

parse

Jun 21st, 2014
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. pseudo-code
  2.  
  3. parse:
  4. if type(thing) is int:
  5. print/use thing
  6. ... repeat for each basic type ...
  7. if type(thing) is dict:
  8. for k,v in thing:
  9. print/use key
  10. parse(v)
  11. if type(thing) is array:
  12. for x in thing:
  13. parse(x)
  14. ... repeat for other container types ...
Advertisement
Add Comment
Please, Sign In to add comment