org.apache.stanbol.contenthub.web.util
Class JSONUtils

java.lang.Object
  extended by org.apache.stanbol.contenthub.web.util.JSONUtils

public class JSONUtils
extends java.lang.Object

Author:
anil.sinaci, meric

Constructor Summary
JSONUtils()
           
 
Method Summary
static java.util.Map<java.lang.String,java.util.List<java.lang.Object>> convertToMap(java.lang.String jsonFields)
          This function only operates on one-level JSON objects.
static java.lang.String convertToString(java.util.Map<java.lang.String,java.util.List<java.lang.Object>> constraints)
           
static java.lang.String createJSONString(LDProgramCollection ldpc)
           
static java.lang.String createJSONString(SearchResult searchResult)
           
static java.lang.String createJSONString(SolrContentItem sci)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONUtils

public JSONUtils()
Method Detail

convertToMap

public static java.util.Map<java.lang.String,java.util.List<java.lang.Object>> convertToMap(java.lang.String jsonFields)
This function only operates on one-level JSON objects. Nested constraints cannot be processed.

Parameters:
jsonFields -
Returns:

convertToString

public static java.lang.String convertToString(java.util.Map<java.lang.String,java.util.List<java.lang.Object>> constraints)

createJSONString

public static java.lang.String createJSONString(SearchResult searchResult)
                                         throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException

createJSONString

public static java.lang.String createJSONString(SolrContentItem sci)
                                         throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException

createJSONString

public static java.lang.String createJSONString(LDProgramCollection ldpc)
                                         throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException


Copyright © 2011-2012 The Apache Software Foundation. All Rights Reserved.