Summary
Converts objects stored in metadata or elsewhere to JSON.
- Assembly
- Wyam
.Json .dll - Namespace
- Wyam
.Json - Interfaces
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IModule"]
click Interface0 "/api/Wyam.Common.Modules/IModule"
Type["GenerateJson"]
class Type type-node
Syntax
public class GenerateJson : IModule
Remarks
Generates JSON for a specified object (which can come from document metadata or elsewhere)
and stores it as new content for each input document or in each document's metadata.
Constructors
Name | Summary |
---|---|
GenerateJson |
The object returned by the specified delegate is converted to JSON, which then either replaces the content of each input document or is stored in the specified metadata key. |
GenerateJson |
The object returned by the specified delegate is converted to JSON, which then either replaces the content of each input document or is stored in the specified metadata key. |
GenerateJson |
Allows you to specify metadata keys for each input document that should be serialized as properties in a JSON object. |
GenerateJson |
The object stored in metadata at the specified key is converted to JSON, which then either replaces the content of each input document or is stored in the specified metadata key. |
Methods
Name | Value | Summary |
---|---|---|
Execute |
IEnumerable |
This should not be called directly, instead call
IExecutionContext.Execute() if you need to execute a module from within another module.
|
WithCamelCase |
GenerateJson |
Specifies whether the generated JSON should use a camel case naming strategy for property names.
The default behavior is not to generate camel case property names.
|
WithIndenting |
GenerateJson |
Specifies whether the generated JSON should be indented.
|
WithSettings |
GenerateJson |
Allows changing the JSON serializer settings.
|