FIX missing indentation before closing braces when displaying a (sub-)array
rewrote the parsing method without regex: more code but easier to maintain and more powerful