the current json implementation could be cleaned up to remove redundancy and improve consistency between the examples