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

std.data.json serializes non-immutable string as array of characters #2150

Closed
Geod24 opened this issue May 2, 2018 · 1 comment
Closed

std.data.json serializes non-immutable string as array of characters #2150

Geod24 opened this issue May 2, 2018 · 1 comment

Comments

@Geod24
Copy link
Contributor

@Geod24 Geod24 commented May 2, 2018

import std.stdio;
import vibe.data.json;

struct Foo
{
    const(char)[] name;
}

void main()
{
    Foo f = Foo("Hello world");
    writeln(f.serializeToJsonString());
}

Result

{"name":["H","e","l","l","o"," ","w","o","r","l","d"]}

CC @christoph-wasicki-sociomantic

s-ludwig added a commit that referenced this issue May 3, 2018
@christoph-wasicki-sociomantic

Merci!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.