Some work to prepare JSON parsing