当前位置: 首页>>代码示例>>Java>>正文


Java FSTConfiguration.createJsonConfiguration方法代码示例

本文整理汇总了Java中org.nustaq.serialization.FSTConfiguration.createJsonConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java FSTConfiguration.createJsonConfiguration方法的具体用法?Java FSTConfiguration.createJsonConfiguration怎么用?Java FSTConfiguration.createJsonConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.nustaq.serialization.FSTConfiguration的用法示例。


在下文中一共展示了FSTConfiguration.createJsonConfiguration方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testLeadingSpaceBug

import org.nustaq.serialization.FSTConfiguration; //导入方法依赖的package包/类
@Test
public void testLeadingSpaceBug() {
    FSTConfiguration fst = FSTConfiguration.createJsonConfiguration();
    PJ pojo = new PJ();
    String x = fst.asJsonString(pojo);
    System.out.println(x);
    String x1 = fst.asJsonString(pojo);
    System.out.println(x1);
    Assert.assertTrue(x.equals(x1));

}
 
开发者ID:RuedigerMoeller,项目名称:fast-serialization,代码行数:12,代码来源:StringEnc.java

示例2: testU

import org.nustaq.serialization.FSTConfiguration; //导入方法依赖的package包/类
@Test
    public void testU() throws IOException {
        FSTConfiguration jsonConfiguration = FSTConfiguration.createJsonConfiguration(false, false);
//        byte[] bytes = Files.readAllBytes(new File("./src/test/json/unknowntest.json").toPath());
        byte[] bytes = Files.readAllBytes(new File("./src/test/json/unknowntest.json").toPath());
        jsonConfiguration.asObject(bytes);
    }
 
开发者ID:RuedigerMoeller,项目名称:fast-serialization,代码行数:8,代码来源:UnknownTest.java

示例3: testUnknown

import org.nustaq.serialization.FSTConfiguration; //导入方法依赖的package包/类
@Test
public void testUnknown() throws UnsupportedEncodingException {
    FSTConfiguration js = FSTConfiguration.createJsonConfiguration();
    byte[] bytes = getBytes("{ 'asd' : 123, '123': 3345.32, 'pok': { 'pak': '345', 'pick':[1,2,3,4.5,[1,2,'3']] } }");
    Unknown x = (Unknown) js.asObject(bytes);
    String ddot = x.ddot("pok.pak");
    System.out.println(ddot);
    System.out.println(x);
}
 
开发者ID:RuedigerMoeller,项目名称:fast-serialization,代码行数:10,代码来源:UnknownTest.java

示例4: testLarge

import org.nustaq.serialization.FSTConfiguration; //导入方法依赖的package包/类
@Test
public void testLarge() throws UnsupportedEncodingException {
    FSTConfiguration js = FSTConfiguration.createJsonConfiguration();
    byte[] bytes = getBytes(getTestJSON());
    Unknown x = (Unknown) js.asObject(bytes);
    System.out.println(x.dot(0,"_id"));
    System.out.println(x.dot(1,"friends",1,"name"));
    System.out.println(x);
}
 
开发者ID:RuedigerMoeller,项目名称:fast-serialization,代码行数:10,代码来源:UnknownTest.java

示例5: conf

import org.nustaq.serialization.FSTConfiguration; //导入方法依赖的package包/类
@Override
public FSTConfiguration conf() {
   return FSTConfiguration.createJsonConfiguration( false, false );
}
 
开发者ID:oaplatform,项目名称:oap,代码行数:5,代码来源:FST.java

示例6: getTestConfiguration

import org.nustaq.serialization.FSTConfiguration; //导入方法依赖的package包/类
@Override
protected FSTConfiguration getTestConfiguration() {
    FSTConfiguration.isAndroid = false;
    return FSTConfiguration.createJsonConfiguration(false,true);
}
 
开发者ID:RuedigerMoeller,项目名称:fast-serialization,代码行数:6,代码来源:BasicJsonTest.java


注:本文中的org.nustaq.serialization.FSTConfiguration.createJsonConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。