public static function fromJson($json, $localeGroupm, array $languages = [])
    {
        if (empty($json) || ($fields = json_decode($json, true)) === null) {
            throw new Exception("The provided string is not a valid json.");
        }

        $transformer = new self($fields, $localeGroup, $languages);

        return $transformer->transfer()->getFields();
    }
public static function fromJson($json, $localeGroupm, array $languages = [])
    {
        if (empty($json) || ($fields = json_decode($json, true)) === null) {
            throw new Exception("The provided string is not a valid json.");
        }

        $transformer = new self($fields, $localeGroup, $languages);

        return $transformer->transfer()->getFields();
    }
public static function fromJson ( $ json , $ localeGroupm , array $ languages = [ ] ) { if ( empty ( $ json ) || ( $ fields = json_decode ( $ json , true ) ) === null ) { throw new Exception ( "The provided string is not a valid json." ) ; } $ transformer = new self ( $ fields , $ localeGroup , $ languages ) ; return $ transformer -> transfer ( ) -> getFields ( ) ; }
It transfres a gining string to a collection of field

@param string|json $json
@param string $localeGroup

@return array
It transfres a gining string to a collection of field