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

Comments

Projects
None yet
2 participants
@Geod24
Contributor

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

This comment has been minimized.

christoph-wasicki-sociomantic commented May 3, 2018

Merci!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment