public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            var catalogueMetaDataCollection = new CatalogueMetaDataCollection();

            serializer.Populate(reader, catalogueMetaDataCollection);
            return(catalogueMetaDataCollection);
        }
示例#2
0
        public HyperCatBuilder(string value)
        {
            var metaDataCollection = new CatalogueMetaDataCollection
            {
                new CatalogueMetaData
                {
                    rel = "urn:X-hypercat:rels:isContentType",
                    val = "application/vnd.hypercat.catalogue+json"
                },
                new CatalogueMetaData
                {
                    rel = "urn:X-hypercat:rels:hasDescription:en",
                    val = value
                }
            };

            Catalogue = new Catalogue
            {
                Items             = new ItemCollection(),
                CatalogueMetaData = metaDataCollection
            };
        }