Update JsonSerializationVisitor.php

Bugfix: the root could be modified when it shouldn't