Code example for Gson

0
 
    private static Gson gson;
 
    @BeforeClass 
    public static void init() { 
        gson = new Gson();
    } 
 
    @Test 
    public void testDefinitionConversion() 
            throws MalformedStreamDefinitionException { 
        String definition = "{" +
                            "  'name':'org.wso2.esb.MediatorStatistics'," + 
                            "  'version':'2.3.0'," + 
                            "  'nickName': 'Stock Quote Information'," + 
                            "  'description': 'Some Desc'," + 
                            "  'tags':['foo', 'bar']," + 
                            "  'metaData':[" + 
                            "          {'name':'ipAdd','type':'STRING'}" + 
                            "  ]," + 
Experience pair programming with AI  Get Codota for Java