19 using System.Collections.Generic;
21 using Newtonsoft.Json.Linq;
49 JToken jvalue = jtok[
"values"];
59 private MapSchema(
Schema valueSchema, PropertyMap props) : base(
Type.Map, props)
61 if (
null == valueSchema)
throw new ArgumentNullException(
"valueSchema",
"valueSchema cannot be null.");
73 writer.WritePropertyName(
"values");
84 if (writerSchema.
Tag !=
Tag)
return false;
95 public override bool Equals(
object obj)
97 if (
this == obj)
return true;
103 return areEqual(that.Props,
this.Props);
static int getHashCode(object obj)
Hash code helper function
override int GetHashCode()
Hash code function
static MapSchema CreateMap(Schema type)
Schema ValueSchema
Schema for map values type
Base class for all unnamed schemas
Base class for all schema types
virtual bool CanRead(Schema writerSchema)
Returns true if and only if data written using writerSchema can be read using the current schema acco...
Type
Enum for schema types
virtual internal void WriteJson(JsonTextWriter writer, SchemaNames names, string encspace)
Writes schema object in JSON format
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
override int GetHashCode()
Hashcode function
internal override void WriteJsonFields(Newtonsoft.Json.JsonTextWriter writer, SchemaNames names, string encspace)
Writes map schema in JSON format
override bool CanRead(Schema writerSchema)
Checks if this schema can read data written by the given schema.
A class that contains a list of named schemas.
Schema(Type type, PropertyMap props)
Constructor for schema class
static bool areEqual(object o1, object o2)
Compares two objects, null is equal to null
override bool Equals(object obj)
Compares equality of two map schemas
Type Tag
Schema type property