Class JsonTools
JSON tools
Inheritance
object
JsonTools
Namespace: Textify.Tools
Assembly: Textify.dll
Syntax
public static class JsonTools
Methods
| Edit this page View SourceBeautifyJson(string)
Beautifies the JSON text contained in the file.
Declaration
public static string BeautifyJson(string JsonFile)
Parameters
| Type | Name | Description |
|---|---|---|
| string | JsonFile | Path to JSON file. |
Returns
| Type | Description |
|---|---|
| string | Beautified JSON |
Exceptions
| Type | Condition |
|---|---|
| FileNotFoundException |
BeautifyJsonText(string)
Beautifies the JSON text.
Declaration
public static string BeautifyJsonText(string JsonText)
Parameters
| Type | Name | Description |
|---|---|---|
| string | JsonText | Contents of a minified JSON. |
Returns
| Type | Description |
|---|---|
| string | Beautified JSON |
FindDifferences(JToken, JToken)
Finds the JSON object differences between the two JSON object tokens
Declaration
public static JObject FindDifferences(JToken sourceObj, JToken targetObj)
Parameters
| Type | Name | Description |
|---|---|---|
| JToken | sourceObj | Source object token |
| JToken | targetObj | Target object token |
Returns
| Type | Description |
|---|---|
| JObject | A JSON object containing differences for objects |
MinifyJson(string)
Minifies the JSON text contained in the file.
Declaration
public static string MinifyJson(string JsonFile)
Parameters
| Type | Name | Description |
|---|---|---|
| string | JsonFile | Path to JSON file. |
Returns
| Type | Description |
|---|---|
| string | Minified JSON |
Exceptions
| Type | Condition |
|---|---|
| FileNotFoundException |
MinifyJsonText(string)
Minifies the JSON text.
Declaration
public static string MinifyJsonText(string JsonText)
Parameters
| Type | Name | Description |
|---|---|---|
| string | JsonText | Contents of a beautified JSON. |
Returns
| Type | Description |
|---|---|
| string | Minified JSON |