/ LJCPHPCodeDoc / LJCCommonLib / LJC / ParseJSON


Parameters
$json - The json text.

Returns

The created object.

Syntax

PHP
public static function ParseJSON($json)

Parses JSON into an object.

Example

PHP
 // Parses JSON into an object.
 private static function ParseJSON()
 {
   $text = "{\"Name\":\"John\",\"Number\":5}";
   $result = LJC::ParseJSON($text);
 
   // result:
   $result = (object) [
     "Name" => "John",
     "Number" => 5,
   ];
 }

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.