Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PrettyJson.cs
4using Waher.Content;
5
7{
12 {
22 {
23 }
24
28 public override string FunctionName => nameof(PrettyJson);
29
37 {
38 object Obj = Argument.AssociatedObjectValue;
39
40 if (Obj is string s)
41 return new StringValue(JSON.PrettyJson(s));
42 else
43 return new StringValue(JSON.PrettyJson(Obj));
44 }
45 }
46}
Helps with common JSON-related tasks.
Definition: JSON.cs:16
static string PrettyJson(string Json)
Reformats JSON to make it easier to read.
Definition: JSON.cs:906
PrettyJson(ScriptNode Argument, int Start, int Length, Expression Expression)
PrettyJson(x)
Definition: PrettyJson.cs:20
override IElement Evaluate(IElement Argument, Variables Variables)
Evaluates the function.
Definition: PrettyJson.cs:36
override string FunctionName
Name of the function
Definition: PrettyJson.cs:28
Class managing a script expression.
Definition: Expression.cs:41
Base class for funcions of one variable.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:21