original_string: public static function serialize($value): string
      {
          $serialized = json_encode(
              self::encode($value, new SplObjectStorage()),
              JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
          );
  
          if (json_last_error() !== JSON_ERROR_NONE) {
              throw new \InvalidArgumentException(json_last_error_msg());
          }
  
          return $serialized;
      }
code: public static function serialize($value): string
      {
          $serialized = json_encode(
              self::encode($value, new SplObjectStorage()),
              JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
          );
  
          if (json_last_error() !== JSON_ERROR_NONE) {
              throw new \InvalidArgumentException(json_last_error_msg());
          }
  
          return $serialized;
      }
code_tokens: public static function serialize ( $ value ) : string { $ serialized = json_encode ( self :: encode ( $ value , new SplObjectStorage ( ) ) , JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) ; if ( json_last_error ( ) !== JSON_ERROR_NONE ) { throw new \ InvalidArgumentException ( json_last_error_msg ( ) ) ; } return $ serialized ; }
docstring: Serialize the given value into a JSON encoded string.
  
  @param mixed $value The value to be serialized.
  
  @return string The JSON encoded string.
docstring_tokens: Serialize the given value into a JSON encoded string .