skip to Main Content

Json conversion of enums to strings

I have the following class: using Newtonsoft.Json; using Newtonsoft.Json.Converters; public class JsonError { [JsonConverter(typeof(StringEnumConverter))] public enum Number { [EnumMember(Value = "0")] Pass, [EnumMember(Value = "1")] Miscalc, [EnumMember(Value = "2")] ReadError } public Number ErrorNumber { get; set; } } And…

VIEW QUESTION

Json – validating typed literals in RDF

given this RDF: @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix ex: <http://example.com/>. @prefix xsd: <http://www.w3.org/2001/XMLSchema#>. ex:bob ex:has '{"name": robert"}'^^rdf:JSON . ex:bob ex:at "204453"^^xsd:dateTime . an RDF engine (such as Apache Jena) can validate some of the typed literals (e.g. xsd:dateTime): $ ~/Downloads/apache-jena-4.7.0/bin/riot --validate…

VIEW QUESTION
Back To Top
Search