this should be equivalent, but faster

because in my case, it's just that the original strings contain \
which needs to become \\ in json