/** * Returns an <tt>JsonElement</tt> representation of this implementation of object. * Arrays, Sets are represented as <tt>JsonArray</tt> and other object and map types * are represented as <tt>JsonObject</tt>. * * @return An instance of {@link JsonElement} of this object. */ @Override public JsonElement toJson() { JsonArray array = new JsonArray(); for (int i = 0; i < registries.length; ++i) { JsonElement element = registries[i].toJson(); array.add(element); } return array; }