Added JSON parsing enum. Pretty, but a little tricky to understand