Added json encoding to string.