Class JsonObjectExtensions
- Namespace
- Songhay.Publications.Extensions
- Assembly
- Songhay.Publications.dll
Extensions of JsonObject
public static class JsonObjectExtensions
- Inheritance
-
JsonObjectExtensions
- Inherited Members
Methods
ToYaml(JsonObject?, ILogger)
Converts the specified JsonElement to a YAML string.
public static string? ToYaml(this JsonObject? documentData, ILogger logger)
Parameters
documentDataJsonObjectthe JsonObject
loggerILoggerthe ILogger
Returns
WithExtract(JsonObject?, IReadOnlyCollection<string>?, int, ILogger)
Returns the specified JsonObject with a Publications extract.
public static JsonObject? WithExtract(this JsonObject? documentData, IReadOnlyCollection<string>? contentLines, int extractLength, ILogger logger)
Parameters
documentDataJsonObjectthe JsonObject
contentLinesIReadOnlyCollection<string>the collection of content lines
extractLengthintthe length of the extract
loggerILoggerthe ILogger
Returns
WithoutConventionalDocumentProperties(JsonObject?, ILogger)
Returns the specified JsonObject without the properties that should display in front matter.
public static JsonObject? WithoutConventionalDocumentProperties(this JsonObject? documentData, ILogger logger)
Parameters
documentDataJsonObjectthe JsonObject
loggerILoggerthe ILogger
Returns
WithoutNonNullableDocumentProperties(JsonObject?, ILogger)
Returns the specified JsonObject
without the properties that are null
and marked DisallowNull.
public static JsonObject? WithoutNonNullableDocumentProperties(this JsonObject? documentData, ILogger logger)
Parameters
documentDataJsonObjectthe JsonObject
loggerILoggerthe ILogger