comparison vendor/nikic/php-parser/doc/component/JSON_representation.markdown @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 5fb285c0d0e3
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
114 The JSON representation may be converted back into an AST using the `JsonDecoder`: 114 The JSON representation may be converted back into an AST using the `JsonDecoder`:
115 115
116 ```php 116 ```php
117 <?php 117 <?php
118 118
119 $nodeDecoder = new PhpParser\NodeDecoder(); 119 $jsonDecoder = new PhpParser\JsonDecoder();
120 $ast = $nodeDecoder->decode($json); 120 $ast = $jsonDecoder->decode($json);
121 ``` 121 ```
122 122
123 Note that not all ASTs can be represented using JSON. In particular: 123 Note that not all ASTs can be represented using JSON. In particular:
124 124
125 * JSON only supports UTF-8 strings. 125 * JSON only supports UTF-8 strings.