Removed manual shape serialization, now that JSON is fully supported.