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

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

public class JSONUtils
extends Object

Author:
anil.sinaci, meric

Constructor Summary
JSONUtils()
           
 
Method Summary
static Map<String,List<Object>> convertToMap(String jsonFields)
          This function only operates on one-level JSON objects.
static String convertToString(Map<String,List<Object>> constraints)
           
static String createJSONString(org.apache.stanbol.contenthub.servicesapi.ldpath.LDProgramCollection ldpc)
           
static String createJSONString(org.apache.stanbol.contenthub.servicesapi.search.featured.SearchResult searchResult)
           
 
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 Map<String,List<Object>> convertToMap(String jsonFields)
This function only operates on one-level JSON objects. Nested constraints cannot be processed.

Parameters:
jsonFields -
Returns:

convertToString

public static String convertToString(Map<String,List<Object>> constraints)

createJSONString

public static String createJSONString(org.apache.stanbol.contenthub.servicesapi.search.featured.SearchResult searchResult)
                               throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException

createJSONString

public static String createJSONString(org.apache.stanbol.contenthub.servicesapi.ldpath.LDProgramCollection ldpc)
                               throws org.codehaus.jettison.json.JSONException
Throws:
org.codehaus.jettison.json.JSONException


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