docs: public JsonObject toJsonObject() {
          JsonObjectBuilder factory = Json.createObjectBuilder();
          if (nym != null) {
              JsonObjectBuilder factory2 = Json.createObjectBuilder();
              factory2.add("x", Base64.getEncoder().encodeToString(IdemixUtils.bigToBytes(nym.getX())));
              factory2.add("y", Base64.getEncoder().encodeToString(IdemixUtils.bigToBytes(nym.getY())));
              factory.add("nym", factory2.build());
          }
  
          if (issuerNonce != null) {
              String b64encoded = Base64.getEncoder().encodeToString(IdemixUtils.bigToBytes(issuerNonce));
              factory.add("issuer_nonce", b64encoded);
          }
  
          if (proofC != null) {
              factory.add("proof_c", Base64.getEncoder().encodeToString(IdemixUtils.bigToBytes(proofC)));
          }
  
          if (proofS != null) {
              factory.add("proof_s", Base64.getEncoder().encodeToString(IdemixUtils.bigToBytes(proofS)));
          }
  
          return factory.build();
      }