Probably everyone using REST webservices face requirements which makes you deal with hierarchical (tree) data structures. How to clearly define when data is expected to be returned in a hierarchical structure and when just a flat object? And what if you need different hierarchical responses in different use cases for the same REST resource? Here I’m going to tell you…