def make_avsc_object(json_data, names=None):<EOL>
if names is None:<EOL><INDENT>names = Names()<EOL><DEDENT>assert isinstance(names, Names)<EOL>if hasattr(json_data, '<STR_LIT>') and callable(json_data.get):  <EOL><INDENT>assert isinstance(json_data, Dict)<EOL>atype = cast(Text, json_data.get('<STR_LIT:type>'))<EOL>other_props = get_other_props(json_data, SCHEMA_RESERVED_PROPS)<EOL>if atype in PRIMITIVE_TYPES:<EOL><INDENT>return PrimitiveSchema(atype, other_props)<EOL><DEDENT>if atype in NAMED_TYPES:<EOL><INDENT>name = cast(Text, json_data.get('<STR_LIT:name>'))<EOL>namespace = cast(Text, json_data.get('<STR_LIT>',<EOL>names.default_namespace))<EOL>if atype == '<STR_LIT>':<EOL><INDENT>symbols = cast(List[Text], json_data.get('<STR_LIT>'))<EOL>doc = json_data.get('<STR_LIT>')<EOL>return EnumSchema(name, namespace, symbols, names, doc, other_props)<EOL><DEDENT>if atype in ['<STR_LIT>', '<STR_LIT:error>']:<EOL><INDENT>fields = cast(List, json_data.get('<STR_LIT>'))<EOL>doc = json_data.get('<STR_LIT>')<EOL>return RecordSchema(name, namespace, fields, names, atype, doc, other_props)<EOL><DEDENT>raise SchemaParseException('<STR_LIT>' % atype)<EOL><DEDENT>if atype in VALID_TYPES:<EOL><INDENT>if atype == '<STR_LIT>':<EOL><INDENT>items = cast(List, json_data.get('<STR_LIT>'))<EOL>return ArraySchema(items, names, other_props)<EOL><DEDENT><DEDENT>if atype is None:<EOL><INDENT>raise SchemaParseException('<STR_LIT>' % json_data)<EOL><DEDENT>raise SchemaParseException('<STR_LIT>' % atype)<EOL><DEDENT>if isinstance(json_data, list):<EOL><INDENT>return UnionSchema(json_data, names)<EOL><DEDENT>if json_data in PRIMITIVE_TYPES:<EOL><INDENT>return PrimitiveSchema(cast(Text, json_data))<EOL><DEDENT>fail_msg = "<STR_LIT>" % json_data<EOL>raise SchemaParseException(fail_msg)<EOL>
Build Avro Schema from data parsed out of JSON string.

@arg names: A Name object (tracks seen names and default space)