public class JsonUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
jsonEncode(String val)
Encode a json string according to the statement:
|
static String |
jsonName(String name)
Encode a json name
|
static String |
jsonNameVal(String indent,
String name,
String val)
Encode a json name and value
|
public static String jsonEncode(String val)
In JSON only the backslash, double quote and ASCII control characters need to be escaped. Forward slashes may be escaped
I assume we also need to do the whitespace characters
val - public static String jsonName(String name)
name - Copyright © 2016 Bedework. All rights reserved.