Show / Hide Table of Contents

Class JsonLdProcessor

Implements the core JSON-LD processing.

Inheritance
System.Object
JsonLdProcessor
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.JsonLd
Assembly: dotNetRdf.dll
Syntax
public class JsonLdProcessor

Properties

| Improve this Doc View Source

BaseIri

Get or set the base IRI for processing.

Declaration
public Uri BaseIri { get; set; }
Property Value
Type Description
System.Uri
Remarks

This value should be set to the IRI of the document being processed if available.

| Improve this Doc View Source

ProcessingMode

Get or set the current processing mode.

Declaration
public JsonLdProcessingMode? ProcessingMode { get; set; }
Property Value
Type Description
JsonLdProcessingMode?
| Improve this Doc View Source

Warnings

Get the warnings generated by the processor.

Declaration
public List<JsonLdProcessorWarning> Warnings { get; }
Property Value
Type Description
System.Collections.Generic.List<T><JsonLdProcessorWarning>
Remarks

May be an empty list.

Methods

| Improve this Doc View Source

Compact(JToken, JToken, JsonLdProcessorOptions)

Run the Compaction algorithm.

Declaration
public static JObject Compact(JToken input, JToken context, JsonLdProcessorOptions options)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken input

The JSON-LD data to be compacted. Expected to be a JObject or JArray of JObject or a JString whose value is the IRI reference to a JSON-LD document to be retrieved.

Newtonsoft.Json.Linq.JToken context

The context to use for the compaction process. May be a JObject, JArray of JObject, JString or JArray of JString. String values are treated as IRI references to context documents to be retrieved.

JsonLdProcessorOptions options

Additional processor options.

Returns
Type Description
Newtonsoft.Json.Linq.JObject
| Improve this Doc View Source

Compact(JToken, JToken)

Run the Compaction algorithm.

Declaration
public JObject Compact(JToken input, JToken context)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken input

The JSON-LD data to be compacted. Expected to be a JObject or JArray of JObject or a JString whose value is the IRI reference to a JSON-LD document to be retrieved.

Newtonsoft.Json.Linq.JToken context

The context to use for the compaction process. May be a JObject, JArray of JObject, JString or JArray of JString. String values are treated as IRI references to context documents to be retrieved.

Returns
Type Description
Newtonsoft.Json.Linq.JObject
| Improve this Doc View Source

Expand(JToken, JsonLdProcessorOptions)

Apply the JSON-LD expansion algorithm to a context JSON object.

Declaration
public static JArray Expand(JToken input, JsonLdProcessorOptions options = null)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken input

The context JSON object to be expanded.

JsonLdProcessorOptions options

Options to apply during the expansion processing.

Returns
Type Description
Newtonsoft.Json.Linq.JArray

The expanded JSON-LD context.

| Improve this Doc View Source

Expand(Uri, JsonLdProcessorOptions)

Apply the JSON-LD context expansion algorithm to the context found at the specified URL.

Declaration
public static JArray Expand(Uri contextUrl, JsonLdProcessorOptions options = null)
Parameters
Type Name Description
System.Uri contextUrl

The URL to load the source context from.

JsonLdProcessorOptions options

Options to apply during the expansion processing.

Returns
Type Description
Newtonsoft.Json.Linq.JArray

The expanded JSON-LD context.

| Improve this Doc View Source

Flatten(JToken, JToken, JsonLdProcessorOptions)

Flattens the given input and compacts it using the passed context according to the steps in the JSON-LD Flattening algorithm.

Declaration
public static JToken Flatten(JToken input, JToken context, JsonLdProcessorOptions options)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken input
Newtonsoft.Json.Linq.JToken context
JsonLdProcessorOptions options
Returns
Type Description
Newtonsoft.Json.Linq.JToken
| Improve this Doc View Source

Flatten(JToken, JToken)

Flattens the given input and compacts it using the passed context according to the steps in the JSON-LD Flattening algorithm.

Declaration
public JToken Flatten(JToken input, JToken context)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken input
Newtonsoft.Json.Linq.JToken context
Returns
Type Description
Newtonsoft.Json.Linq.JToken
| Improve this Doc View Source

Frame(JToken, JToken, JsonLdProcessorOptions)

Applies the framing algorithm to the specified input.

Declaration
public static JObject Frame(JToken input, JToken frame, JsonLdProcessorOptions options)
Parameters
Type Name Description
Newtonsoft.Json.Linq.JToken input

The input to be framed.

Newtonsoft.Json.Linq.JToken frame

The framing specification document.

JsonLdProcessorOptions options

Processor options.

Returns
Type Description
Newtonsoft.Json.Linq.JObject

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • View Source
In This Article
  • Properties
    • BaseIri
    • ProcessingMode
    • Warnings
  • Methods
    • Compact(JToken, JToken, JsonLdProcessorOptions)
    • Compact(JToken, JToken)
    • Expand(JToken, JsonLdProcessorOptions)
    • Expand(Uri, JsonLdProcessorOptions)
    • Flatten(JToken, JToken, JsonLdProcessorOptions)
    • Flatten(JToken, JToken)
    • Frame(JToken, JToken, JsonLdProcessorOptions)
  • Extension Methods
Back to top Generated by DocFX