$className * @param array $json * @return T */ public function newFromJsonArray( string $className, array $json ); /** * Return an optional type hint for the given array key in the result of * ::toJsonArray() / input to ::newFromJsonArray. If a class name is * returned here and it matches the runtime type of the value of that * array key, then type information will be omitted from the generated * JSON which can save space. The class name can be suffixed with `[]` * to indicate an array or list containing objects of the given class * name. * * @param class-string $className The class we're looking for a hint for * @param string $keyName The name of the array key we'd like a hint on * @return class-string|string|Hint|null A class string, Hint or null. * For backward compatibility, a class string suffixed with `[]` can * also be returned, but that is deprecated. */ public function jsonClassHintFor( string $className, string $keyName ); }