Changeset 396 for tapas/common


Ignore:
Timestamp:
03/05/12 16:23:47 (12 years ago)
Author:
vmipsl
Message:

serialization javascript --> toJson
récupération json en objet java dans le controller

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tapas/common/implementation/com/ether/JSONHelperImpl.java

    r376 r396  
    11package com.ether; 
    2  
    3 import java.lang.reflect.TypeVariable; 
    4 import java.util.Collection; 
    5 import java.util.Collections; 
    6 import java.util.Map; 
    72 
    83import net.sf.json.JSON; 
     
    127import net.sf.json.JsonConfig; 
    138import net.sf.json.processors.JsonBeanProcessor; 
    14  
    159import org.apache.commons.logging.Log; 
    1610import org.apache.commons.logging.LogFactory; 
     
    1812import org.jetbrains.annotations.Nullable; 
    1913import org.springframework.beans.factory.InitializingBean; 
     14 
     15import java.lang.reflect.TypeVariable; 
     16import java.util.Collection; 
     17import java.util.Collections; 
     18import java.util.Map; 
    2019 
    2120@SuppressWarnings("rawtypes") 
     
    2827    } 
    2928 
    30         public void afterPropertiesSet() 
     29    public void afterPropertiesSet() 
    3130            throws Exception 
    3231    { 
     
    113112        } 
    114113        final JSONObject jsonObject = JSONObject.fromObject( json, _jsonConfig ); 
    115         return (T) JSONObject.toBean( jsonObject, beanClass, _mapClassesForDeserialization.get( beanClass ) ); 
     114        return (T) JSONObject.toBean( jsonObject, beanClass ); 
     115//        return (T) JSONObject.toBean( jsonObject, beanClass, _mapClassesForDeserialization.get( beanClass ) ); 
    116116    } 
    117117 
     
    141141    } 
    142142 
    143     private static final Log LOGGER = LogFactory.getLog(JSONHelperImpl.class);     
     143    private static final Log LOGGER = LogFactory.getLog( JSONHelperImpl.class ); 
    144144 
    145145    private Map<Class, JsonBeanProcessor> _mapping = Collections.emptyMap(); 
Note: See TracChangeset for help on using the changeset viewer.