19 using System.Collections.Generic;
21 using Newtonsoft.Json;
45 const string q =
"\"";
46 if (type.StartsWith(q) && type.EndsWith(q)) type = type.Substring(1, type.Length - 2);
93 return t ==
Type.Int || t ==
Type.Long || t ==
Type.Float;
95 return t ==
Type.Int || t ==
Type.Long;
110 if (
this == obj)
return true;
115 if (this.
Tag == that.Tag)
116 return areEqual(that.Props,
this.Props);
static int getHashCode(object obj)
Hash code helper function
Base class for all unnamed schemas
Base class for all schema types
override int GetHashCode()
Hashcode function
Type
Enum for schema types
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Class for schemas of primitive types
static PrimitiveSchema NewInstance(string type, PropertyMap props=null)
Static function to return new instance of primitive schema
internal override void WriteJson(JsonTextWriter w, SchemaNames names, string encspace)
Writes primitive schema in JSON format
A class that contains a list of named schemas.
override bool CanRead(Schema writerSchema)
Checks if this schema can read data written by the given schema.
static bool areEqual(object o1, object o2)
Compares two objects, null is equal to null
override bool Equals(object obj)
Function to compare equality of two primitive schemas
Type Tag
Schema type property