code: public static Matcher<JsonElement> withCharsLessOrEqualTo(final int value) {
          return new TypeSafeDiagnosingMatcher<JsonElement>() {
  
              @Override
              protected boolean matchesSafely(JsonElement item, Description mismatchDescription) {
                  //we do not care for the properties if parent item is not String
                  if (!item.isString()) return true;
                  if (item.asString().length() > value) {
                      mismatchDescription.appendText("String length more than maximum value: " + value);
                      return false;
                  }
                  return true;
              }
  
              @Override
              public void describeTo(Description description) {
                  description.appendText("String maximum length");
              }
          };
      }
docs: ==> STRING ==>