JSON changes

started writing the json writer code