/// <summary>Performs RDF dataset normalization on the given JSON-LD input.</summary> /// <remarks> /// Performs RDF dataset normalization on the given JSON-LD input. The output /// is an RDF dataset unless the 'format' option is used. /// </remarks> /// <param name="input">the JSON-LD input to normalize.</param> /// <?></?> /// <param name="callback">(err, normalized) called once the operation completes.</param> /// <exception cref="JSONLDProcessingError">JSONLDProcessingError</exception> /// <exception cref="JsonLDNet.Core.JsonLdError"></exception> public static object Normalize(JToken input, JsonLdOptions options) { JsonLdOptions opts = options.Clone(); opts.format = null; RDFDataset dataset = (RDFDataset)ToRDF(input, opts); return(new JsonLdApi(options).Normalize(dataset)); }
/// <summary>Performs RDF dataset normalization on the given JSON-LD input.</summary> /// <remarks> /// Performs RDF dataset normalization on the given JSON-LD input. The output /// is an RDF dataset unless the 'format' option is used. /// </remarks> /// <param name="input">the JSON-LD input to normalize.</param> /// <param name="options"></param> /// <exception cref="JsonLdError"></exception> public static async Task <object> NormalizeAsync(JToken input, JsonLdOptions options) { var opts = options.Clone(); opts.format = null; var dataset = (RdfDataset) await ToRdfAsync(input, opts); return(new JsonLdApi(options).Normalize(dataset)); }
/// <summary>Performs RDF dataset normalization on the given JSON-LD input.</summary> /// <remarks> /// Performs RDF dataset normalization on the given JSON-LD input. The output /// is an RDF dataset unless the 'format' option is used. /// </remarks> /// <param name="input">the JSON-LD input to normalize.</param> /// <?></?> /// <param name="callback">(err, normalized) called once the operation completes.</param> /// <exception cref="JSONLDProcessingError">JSONLDProcessingError</exception> /// <exception cref="JsonLDNet.Core.JsonLdError"></exception> public static object Normalize(JToken input, JsonLdOptions options) { #if !PORTABLE JsonLdOptions opts = options.Clone(); opts.format = null; RDFDataset dataset = (RDFDataset)ToRDF(input, opts); return(new JsonLdApi(options).Normalize(dataset)); #else throw new PlatformNotSupportedException(); #endif }