The main logic of JSON converting
It substitutes a part of output with other data.
Nested matches are not considered. Data are converted only by the first match.