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
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.
public bool IsApplicable(List<ArtifactFileAnnotation> artifactFileAnnotations)
Returns
System.Boolean
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List < Workspace.XBR.Xperiflow.Routines.Artifacts.ArtifactFileAnnotation > | artifactFileAnnotations | The 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
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
Type | Name | Description |
---|---|---|
Workspace.XBR.Xperiflow.MetaFileSystem.IMetaFileSystemClient | metaFileSystemClient | The MetaFileSystemClient to use to read the text file. |
System.String | dirpath | The 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