Minor json parsing improvements