I have a file that is structured in a large multidimensional structure, similar to json, but not close enough for me to use a json library.
The data looks something
I think you might get something using preg_split by matching [a-zA-Z0-9][:blank]+{ and }. You'll be able to construct your array by going through the result. Use a recursive function which goes deeper when you match an opening tag, and upper on a closing tag.
Otherwise, cleanest solution would be to implement an ANTLR grammar !