fr.paris.lutece.plugins.document.modules.ckan.service
Class MapperService

java.lang.Object
  extended by fr.paris.lutece.plugins.document.modules.ckan.service.MapperService

public final class MapperService
extends Object

Mapper Service


Method Summary
static
<T> String
getJson(T bean)
          Transform the model into a JSON String
static
<T> T
readJson(String strJson, Class<T> clazz)
          Read a JSON String to fill a model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJson

public static <T> String getJson(T bean)
Transform the model into a JSON String

Type Parameters:
T - The bean class
Parameters:
bean - The bean object
Returns:
A JSON String

readJson

public static <T> T readJson(String strJson,
                             Class<T> clazz)
Read a JSON String to fill a model

Type Parameters:
T - The class of the bean
Parameters:
strJson - The JSON String
clazz - The class of the bean
Returns:
The model


Copyright © 2013 Mairie de Paris. All Rights Reserved.