For what is the JsonObjectAttribute.Id?
问题 JSON.NET JsonObjectAttribute has a property Id. It's inherited from the JsonContainerAttribute. I cannot find, for what is the Id property is used? 回答1: It's used by Json.NET Schema to override the default "$id" property value when generating a schema for a type. E.g. if I have the following type: [JsonObject(Id = "http://foo.bar/schemas/rootobject.json")] public class RootObject { } And auto-generate a schema using JSchemaGenerator as follows: var schema = new JSchemaGenerator().Generate