ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Json.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
34class Json implements Transformation
35{
38
39 public function transform($from)
40 {
41 return json_encode($from, JSON_HEX_QUOT | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_THROW_ON_ERROR);
42 }
43}
This class expects a valid UTF-8 string.
Definition: Json.php:35
transform($from)
Perform the transformation.
Definition: Json.php:39
A transformation is a function from one datatype to another.