code: private void writeODataType(StructuredType structuredType) throws IOException {
          if (entitySet != null) {
              String typeName = entitySet.getTypeName();
              String type = typeName.substring(typeName.lastIndexOf(".") + 1, typeName.length());
  
              if (!type.equals(structuredType.getName())) {
                  jsonGenerator.writeStringField(TYPE, String.format("#%s.%s",
                          structuredType.getNamespace(), structuredType.getName()));
              } else {
                  LOG.trace("{} has root level. {} won't be written here", entitySet.getName(), TYPE);
              }
          }
      }
docs: This methods write @odata.type of complex type.
  If complex type has root-level, @odata.type won't be written.
  
  @param structuredType structuredType