LAX_SCHEMA
LAX_SCHEMA = 1
Reads/writes json files.
__construct(string $path, \Composer\Util\RemoteFilesystem $rfs = null, \Composer\IO\IOInterface $io = null)
Initializes json file reader/parser.
string | $path | path to a lockfile |
\Composer\Util\RemoteFilesystem | $rfs | required for loading http/https json files |
\Composer\IO\IOInterface | $io |
validateSchema(integer $schema = self::STRICT_SCHEMA) : boolean
Validates the schema of the current json file according to composer-schema.json rules
integer | $schema | a JsonFile::*_SCHEMA constant |
true on success
encode(mixed $data, integer $options = 448) : string
Encodes an array into (optionally pretty-printed) JSON
mixed | $data | Data to encode into a formatted JSON string |
integer | $options | json_encode options (defaults to JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) |
Encoded json