Write unit tests for json parsing

This is far from perfect but since the unmanaged file schema does now produce less precise but also far less confusing/verbose output the error handling is now much simpler than before.

I am not sure if I should move these optimizations to their own methods but at least they are tested via the expected output.