org.apache.sling.commons.json.util
Class Validator

java.lang.Object
  extended by org.apache.sling.commons.json.util.Validator

public class Validator
extends java.lang.Object

Utility class for validating JSON text.


Constructor Summary
Validator()
           
 
Method Summary
static void validate(JSONTokener x)
          Strictly validate the JSON text
static void validate(java.lang.String text)
          Strictly validate the JSON text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator()
Method Detail

validate

public static void validate(java.lang.String text)
                     throws JSONException
Strictly validate the JSON text

Parameters:
text - The text to check.
Throws:
JSONException - If the text is not valid.

validate

public static void validate(JSONTokener x)
                     throws JSONException
Strictly validate the JSON text

Parameters:
x - The tokener to check.
Throws:
JSONException - If the text is not valid.


Copyright © 2007-2009. All Rights Reserved.