Skip to main content

Class JsonArtifactReader

An Artifact for reading a JObject from a json. This Artifact reader is meant to be very flexible in that it will read from any single .json file ignoring the schema.json file if it exists. If the schema.json is the only file, it will read from that as the data file.

Namespace: Workspace.XBR.Xperiflow.Routines.Io

Assembly: Xperiflow.dll

Declaration
public class JsonArtifactReader : IArtifactReader<JObject>

Implements: Workspace.XBR.Xperiflow.Routines.Io.IArtifactReader<Newtonsoft.Json.Linq.JObject>

Methods

IsApplicable(List<ArtifactFileAnnotation>)

Determine whether or not this Artifact Reader is applicable to the given artifact file annotations.

Declaration
public bool IsApplicable(List<ArtifactFileAnnotation> artifactFileAnnotations)
Returns

System.Boolean

Parameters
TypeNameDescription
System.Collections.Generic.List< Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactFileAnnotation >artifactFileAnnotationsThe file annotation protocol as defined by the Routine system.

Read(IMetaFileSystemClient, string, List<ArtifactFileAnnotation>)

Reads a string from a text file called data.json based on a directory path that exists in the Workspace.XBR.Xperiflow.MetaFileSystem.IMetaFileSystemClient, converting it to a JObject

Declaration
public JObject Read(IMetaFileSystemClient metaFileSystemClient, string dirpath, List<ArtifactFileAnnotation> artifactFileAnnotations)
Returns

Newtonsoft.Json.Linq.JObject

JObject created by the string data from the json file.

Parameters
TypeNameDescription
Workspace.XBR.Xperiflow.MetaFileSystem.IMetaFileSystemClientmetaFileSystemClientThe MetaFileSystemClient to use to read the text file.
System.StringdirpathThe directory path to where the text file data.json exists.
System.Collections.Generic.List< Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactFileAnnotation >artifactFileAnnotations

Implements

  • Workspace.XBR.Xperiflow.Routines.Io.IArtifactReader<Newtonsoft.Json.Linq.JObject>

Inherited Members

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.ToString

Was this page helpful?