docs: public static JsonValue serializeAsJson(Object o) throws IOException {
          try {
              return findFieldsToSerialize(o).mainObject;
          } catch (IllegalStateException ise) {
              // the reflective attempt to build the object failed.
              throw new IOException("Unable to build JSON for Object", ise);
          } catch (JsonException e) {
              throw new IOException("Unable to build JSON for Object", e);
          }
      }