Get pretty printed object prototype of schema. Args: schema: object, Parsed JSON schema. Returns: string, A string that contains a prototype object with comments that conforms to the given schema.
(self, schema)
| 145 | return _SchemaToStruct(schema, seen, dent=dent).to_str(self._prettyPrintByName) |
| 146 | |
| 147 | def prettyPrintSchema(self, schema): |
| 148 | """Get pretty printed object prototype of schema. |
| 149 | |
| 150 | Args: |
| 151 | schema: object, Parsed JSON schema. |
| 152 | |
| 153 | Returns: |
| 154 | string, A string that contains a prototype object with |
| 155 | comments that conforms to the given schema. |
| 156 | """ |
| 157 | # Return with trailing comma and newline removed. |
| 158 | return self._prettyPrintSchema(schema, dent=0)[:-2] |
| 159 | |
| 160 | def get(self, name, default=None): |
| 161 | """Get deserialized JSON schema from the schema name. |