Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KV.put is now JSON encoding the given data #187

Closed
Annih opened this issue Mar 19, 2019 · 2 comments
Closed

KV.put is now JSON encoding the given data #187

Annih opened this issue Mar 19, 2019 · 2 comments

Comments

@Annih
Copy link
Contributor

Annih commented Mar 19, 2019

Version

With diplomat (2.1.1)

Step to reproduce

When doing KV.put('my_key', '{ "a": 1}')

Expected result

I expect to save my given value as it in the kv store, i.e.: { "a": 1 }

Actual result

Instead I got "{ \"a\": 1}"

@Annih
Copy link
Contributor Author

Annih commented Mar 19, 2019

This seems to be related to the following changes 35c369f#diff-7730494772290edba80a3e678479ae31L111

Which now leverage send_put_request which does a JSON.dump (https://github.com/WeAreFarmGeek/diplomat/blob/master/lib/diplomat/rest_client.rb#L217)

@pierresouchay
Copy link
Member

Thank you for the report, we will revert to old behavior asap

tionebsalocin added a commit to tionebsalocin/diplomat that referenced this issue Mar 19, 2019
As every data was converted to json, raw data
usage was impossible

Reverting all json conversion to source function and
remove systematic conversion.

Fixes: WeAreFarmGeek#187
pierresouchay pushed a commit that referenced this issue Mar 19, 2019
As every data was converted to json, raw data
usage was impossible

Reverting all json conversion to source function and
remove systematic conversion.

Fixes: #187
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants