public function convert($object, $ignoreNonSerialisables = false, $prettyPrint = false) {

        // Normalise the input to array form.
        $object = $this->normaliseToArrayForm($object, $ignoreNonSerialisables);

        // Then simply encode using PHP JSON libraries.
        return json_encode($object, $prettyPrint ? JSON_PRETTY_PRINT : null);
    }
public function convert($object, $ignoreNonSerialisables = false, $prettyPrint = false) {

        // Normalise the input to array form.
        $object = $this->normaliseToArrayForm($object, $ignoreNonSerialisables);

        // Then simply encode using PHP JSON libraries.
        return json_encode($object, $prettyPrint ? JSON_PRETTY_PRINT : null);
    }
public function convert ( $ object , $ ignoreNonSerialisables = false , $ prettyPrint = false ) { // Normalise the input to array form. $ object = $ this -> normaliseToArrayForm ( $ object , $ ignoreNonSerialisables ) ; // Then simply encode using PHP JSON libraries. return json_encode ( $ object , $ prettyPrint ? JSON_PRETTY_PRINT : null ) ; }
Convert a passed object to JSON notation
Convert a passed object to JSON notation