code: @SuppressWarnings("rawtypes")
      protected static boolean writeBasic(Output out, Object basic) {
          if (basic == null) {
              out.writeNull();
          } else if (basic instanceof Boolean) {
              out.writeBoolean((Boolean) basic);
          } else if (basic instanceof Number) {
              out.writeNumber((Number) basic);
          } else if (basic instanceof String) {
              out.writeString((String) basic);
          } else if (basic instanceof Enum) {
              out.writeString(((Enum) basic).name());
          } else if (basic instanceof Date) {
              out.writeDate((Date) basic);
          } else {
              return false;
          }
          return true;
      }
docs: Writes a primitive out as an object
  
  @param out
  Output writer
  @param basic
  Primitive
  @return boolean true if object was successfully serialized, false otherwise