Examples of toJson()


Examples of org.hornetq.jms.transaction.JMSTransactionDetail.toJSON()

         if (tx == null)
         {
            continue;
         }
         TransactionDetail detail = new JMSTransactionDetail(xid, tx, entry.getValue());
         txDetailListJson.put(detail.toJSON());
      }
      return txDetailListJson.toString();
   }

   public String listPreparedTransactionDetailsAsHTML() throws Exception
View Full Code Here

Examples of org.jclouds.json.Json.toJson()

            return runtime;
         }
      });
      Json json = injector.getInstance(Json.class);
      Ohai ohai = injector.getInstance(Ohai.class);
      assertEquals(json.toJson(ohai.ohai.get().get("uptime_seconds")), "69876");
   }

   static class Ohai {
      private Supplier<Map<String, JsonBall>> ohai;
View Full Code Here

Examples of org.jose4j.jwk.PublicJsonWebKey.toJson()

        assertTrue(pem.charAt(BaseNCodec.PEM_CHUNK_SIZE) == '\r');
        assertTrue(pem.charAt(BaseNCodec.PEM_CHUNK_SIZE + 1) == '\n');

        PublicJsonWebKey jwk = PublicJsonWebKey.Factory.newPublicJwk(x509Certificate.getPublicKey());
        jwk.setCertificateChain(x509Certificate);
        String jsonJwk = jwk.toJson(JsonWebKey.OutputControlLevel.PUBLIC_ONLY);

        PublicJsonWebKey jwkFromJson = PublicJsonWebKey.Factory.newPublicJwk(jsonJwk);
        assertEquals(x509Certificate.getPublicKey(), jwkFromJson.getPublicKey());
        assertEquals(x509Certificate, jwkFromJson.getLeafCertificate());
    }
View Full Code Here

Examples of org.kairosdb.client.builder.aggregator.CustomAggregator.toJson()

  public void test_createCustomAggregator()
  {
    CustomAggregator aggregator = AggregatorFactory.createCustomAggregator("foobar", "\"foo\": 10");

    assertThat(aggregator.getName(), equalTo("foobar"));
    assertThat(aggregator.toJson(), equalTo("{\"name\":\"foobar\",\"foo\": 10}"));
  }

  @Test
  public void test_createDivAggregator()
  {
View Full Code Here

Examples of org.lilyproject.tools.import_.json.EntityWriter.toJson()

            ArrayNode resultsNode = listNode.putArray("results");

            EntityWriter writer = getEntityWriter(genericType);
            for (Object entity : entityList.getEntities()) {
                // Multiple repositories: ok to use public repo since only non-repository-specific things are needed
                resultsNode.add(writer.toJson(entity, entityList.getWriteOptions(),
                        repositoryMgr.getDefaultRepository()));
            }

            JsonFormat.serialize(listNode, new CloseShieldOutputStream(entityStream));
        } catch (Throwable e) {
View Full Code Here

Examples of org.lilyproject.util.repo.RecordEvent.toJson()

                    return;
                }

                if (expectedEvents.isEmpty()) {
                    System.err
                            .println("No events are expected, but we just got event " + recordEvent.toJson() + " on " + recordId);
                    failures++;
                    return;
                }

                Pair<RecordId, RecordEvent> expectedPair = expectedEvents.remove(0);
View Full Code Here

Examples of org.mitre.openid.connect.model.UserInfo.toJson()

    // get the userinfo claims for each scope
    UserInfo user = userInfoService.getByUsername(p.getName());
    Map<String, Map<String, String>> claimsForScopes = new HashMap<String, Map<String, String>>();
    if (user != null) {
      JsonObject userJson = user.toJson();
 
      for (SystemScope systemScope : sortedScopes) {
        Map<String, String> claimValues = new HashMap<String, String>();
 
        Set<String> claims = scopeClaimTranslationService.getClaimsForScope(systemScope.getValue());
View Full Code Here

Examples of org.mortbay.util.ajax.JSON.Convertor.toJSON()

                e.printStackTrace();
            }
        }
        if (convertor!=null&&obj.getClass()!=Object.class)
        {
            convertor.toJSON(obj, out);
        }
        else
        {
            out.add(obj.toString());
        }
View Full Code Here

Examples of org.neo4j.cypherdsl.result.JSONSerializer.toJSON()

                match( node( "john" ).out( "friend" ).node().out( "friend" ).node( "fof" ) ).
                returns( as( identifier( "john" ).property( "name" ), "name" ), as( identifier( "fof" ).property(
                        "name" ), "friend" ), identifier( "john" ), as( count(), "count" ) )
                .toString();
        try (Transaction tx = graphdb.beginTx()) {
            String json = serializer.toJSON( engine.execute( query ) ).toString();
            System.out.println( json );
            tx.success();
        }
    }
View Full Code Here

Examples of org.one2team.highcharts.shared.Jsonify.toJson()

    // json export
    // ----------------
    // Inputs :
    //    1. chartOptions : chartOptions1
    Jsonify jsonify = (Jsonify) highchartsSamples.createColumnBasic ();
    String json = jsonify.toJson ();
    System.out.println("json "+json);
    pngFromJsonExporter.export (json, null, new File (exportDirectory, "column-basic-from-jsonified-java.png"));
  }

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.