public class PHP2Map
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
PHP_ARRAY |
static int |
PHP_BOOLEAN |
static int |
PHP_DEFAULT |
static int |
PHP_FLOAT |
static int |
PHP_NULL |
static int |
PHP_NUMBER |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsKey(java.util.Map ph,
java.lang.String keyPath)
returns true if the keyPath exists or false otherwise
|
static int |
count(java.util.Map ph,
java.lang.String keyPath)
returns the number of children referenced by the keyPath or -1
|
static java.lang.String |
diff(java.util.List ps,
java.util.List pt,
java.lang.String indent)
It returns the difference in JSON between two Lists
|
static java.lang.String |
diff(java.util.Map ps,
java.util.Map pt,
java.lang.String indent)
It returns the difference in JSON between two Maps
|
static void |
flatten(java.util.Map m)
It converts a multi-layered map into a flat map with the leaves only.
|
static void |
flatten(java.lang.String s,
java.util.Map m) |
static java.lang.Object |
get(java.util.Map ph,
java.lang.String keyPath)
returns the object referenced by the keyPath or null
|
static void |
main(java.lang.String[] args) |
static java.util.Map |
parse(java.io.Reader in)
parses PHP stream from in and returns a Map, MT-safe
|
static java.lang.String |
toJSON(java.util.List a,
java.lang.String indent,
java.lang.String end)
It returns JSON content for a given List with indent
|
static java.lang.String |
toJSON(java.util.Map m)
It returns JSON content in the tabular format for a given Map
|
static java.lang.String |
toJSON(java.util.Map m,
java.lang.String indent,
java.lang.String end)
It returns JSON content for a given Map with indent
|
static java.lang.String |
toXML(java.util.Map m)
It returns XML content in the tabular format for a given Map
|
static java.lang.String |
toXML(java.util.Map m,
java.lang.String indent,
java.lang.String end)
It returns XML content for a given Map with indent
|
static java.lang.String |
toXML(java.lang.String key,
java.util.List a,
java.lang.String indent,
java.lang.String end)
It returns XML content for a given List with indent
|
static void |
unflatten(java.util.Map m)
It unflattens a flat map into a multi-layered map.
|
static void |
unflatten(java.lang.String s,
java.util.Map m) |
public static final int PHP_DEFAULT
public static final int PHP_ARRAY
public static final int PHP_NUMBER
public static final int PHP_FLOAT
public static final int PHP_BOOLEAN
public static final int PHP_NULL
public static java.lang.String toJSON(java.util.Map m)
public static java.lang.String toJSON(java.util.Map m, java.lang.String indent, java.lang.String end)
public static java.lang.String toJSON(java.util.List a, java.lang.String indent, java.lang.String end)
public static java.lang.String diff(java.util.Map ps, java.util.Map pt, java.lang.String indent)
public static java.lang.String diff(java.util.List ps, java.util.List pt, java.lang.String indent)
public static void flatten(java.util.Map m)
public static void flatten(java.lang.String s, java.util.Map m)
public static void unflatten(java.util.Map m)
public static void unflatten(java.lang.String s, java.util.Map m)
public static java.lang.String toXML(java.util.Map m)
public static java.lang.String toXML(java.util.Map m, java.lang.String indent, java.lang.String end)
public static java.lang.String toXML(java.lang.String key, java.util.List a, java.lang.String indent, java.lang.String end)
public static boolean containsKey(java.util.Map ph, java.lang.String keyPath)
public static int count(java.util.Map ph, java.lang.String keyPath)
public static java.lang.Object get(java.util.Map ph, java.lang.String keyPath)
public static java.util.Map parse(java.io.Reader in) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)