Examples of toJson()


Examples of com.lgx8.common.PageList.toJSON()

        hql = " from Rechargehistory t1 where "+sb.toString().substring(4)+" order by t1.CZSJ desc";
      }else{
        hql = " from Rechargehistory t1 order by t1.CZSJ desc";
      }
      PageList list = rechargehistoryDao.listRechargehistoryByConditions(hql, new Object[]{}, pr);
      printJSON(response, list.toJSON());
    }
    return null;
  }
 
View Full Code Here

Examples of com.linkedin.databus2.core.container.monitoring.mbean.ContainerTrafficTotalStats.toJson()

      throw new InvalidRequestParamValueException(request.getName(), prefix, client);
    }

    JsonEncoder jsonEncoder = clientStats.createJsonEncoder(
        Channels.newOutputStream(request.getResponseContent()));
    clientStats.toJson(jsonEncoder, null);

    if (request.getRequestType() == HttpMethod.PUT || request.getRequestType() == HttpMethod.POST)
    {
      enableOrResetStatsMBean(clientStats, request);
    }
View Full Code Here

Examples of com.linkedin.databus2.core.container.monitoring.mbean.ContainerTrafficTotalStatsMBean.toJson()

    //String json = outboundTrafficTotalStatsMBean.toJson();
    JsonEncoder jsonEncoder =
        outboundTrafficTotalStatsMBean.createJsonEncoder(
            Channels.newOutputStream(request.getResponseContent()));
    outboundTrafficTotalStatsMBean.toJson(jsonEncoder, null);

    if (request.getRequestType() == HttpMethod.PUT || request.getRequestType() == HttpMethod.POST)
    {
      enableOrResetStatsMBean(outboundTrafficTotalStatsMBean, request);
    }
View Full Code Here

Examples of com.massivecraft.mcore.xlib.gson.Gson.toJson()

  {
    Gson gson = MCore.gson;
    Coll<E> coll = this.getColl();
    if (coll != null) gson = coll.getGson();
   
    return this.getClass().getSimpleName()+gson.toJson(this, this.getClass());
  }
 
}
View Full Code Here

Examples of com.mongodb.hadoop.splitter.MultiCollectionSplitBuilder.toJSON()

                    null)
               .add(new MongoClientURI("mongodb://localhost:27017/mongo_hadoop.yield_historical.in"), null, true, null, null,
                    new BasicDBObject("_id", new BasicDBObject("$gt", new Date(883440000000L))), false, null);

        Configuration conf = new Configuration();
        conf.set(MultiMongoCollectionSplitter.MULTI_COLLECTION_CONF_KEY, builder.toJSON());

        System.exit(ToolRunner.run(conf, new TreasuryYieldXMLConfig(conf), pArgs));
    }
}
View Full Code Here

Examples of com.ngdata.hbaseindexer.model.impl.IndexerDefinitionJsonSerDeser.toJson()

            throws IOException, WebApplicationException {
        ArrayNode array = JsonNodeFactory.instance.arrayNode();
        IndexerDefinitionJsonSerDeser converter = IndexerDefinitionJsonSerDeser.INSTANCE;

        for (IndexerDefinition index : indices) {
            array.add(converter.toJson(index));
        }

        ObjectMapper objectMapper = new ObjectMapper();
        IOUtils.write(objectMapper.writeValueAsBytes(array), outputStream);
    }
View Full Code Here

Examples of com.opengamma.web.json.ValueRequirementJSONBuilder.toJSON()

                      MultivaluedMap<String, Object> httpHeaders,
                      OutputStream entityStream) throws IOException, WebApplicationException {
    Object[] rootNode = AnalyticsNodeJsonWriter.getJsonStructure(gridStructure.getRootNode());
    List<Map<String, Object>> columns = _writer.getJsonStructure(gridStructure.getColumnStructure().getGroups());
    ValueRequirementJSONBuilder jsonBuilder = new ValueRequirementJSONBuilder();
    String valueReqStr = jsonBuilder.toJSON(gridStructure.getRootRequirement());
    JSONObject valueReqJson;
    try {
      // need to convert it to a JSON object instead of a string otherwise it will be inserted into the outer object
      // as an escaped string instead of a child object
      valueReqJson = new JSONObject(valueReqStr);
View Full Code Here

Examples of com.opera.core.systems.mobile.OperaMobileEmulation.toJson()

  @Test
  public void toJsonSerializesProperly() throws JSONException {
    OperaMobileEmulation profile = (OperaMobileEmulation) OperaMobileEmulation.builder()
        .setProfileName("hoobaflooba").build();
    JSONObject json = profile.toJson();

    assertEquals(profile.getProfileName(), json.get("profileName"));
    assertEquals(profile.getResolution().getWidth(), json.get("width"));
    assertEquals(profile.getResolution().getHeight(), json.get("height"));
    assertEquals(profile.getPPI(), json.get("ppi"));
View Full Code Here

Examples of com.opera.core.systems.scope.stp.services.ScopeSelftest.ScopeSelftestResult.toJson()

        .setTestResult(Selftest.SelftestResult.Result.PASS)
        .setReason("reason")
        .setLineNumber(2)
        .build();

    JSONObject json = expected.toJson();

    assertEquals(expected.getTestName(), json.get("testName"));
    assertEquals(expected.getGroupName(), json.get("groupName"));
    assertEquals(expected.getFileName(), json.get("fileName"));
    assertEquals(expected.getResult(), json.get("result"));
View Full Code Here

Examples of com.orientechnologies.orient.core.record.ORecord.toJSON()

           if (entry instanceof OIdentifiable) {
             ORecord rec = ((OIdentifiable) entry).getRecord();
             if (rec != null)
               try {
                 objectJson = rec.toJSON(format);

                 buffer.append(objectJson);
               } catch (Exception e) {
                 OLogManager.instance().error(this, "Error transforming record " + rec.getIdentity() + " to JSON", e);
               }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.