Skip to content

Commit

Permalink
Merge pull request #1109 from japplegame/patch-3
Browse files Browse the repository at this point in the history
JsonSerializer.writeValue should accept immutable/const values
  • Loading branch information
s-ludwig committed Jun 11, 2015
2 parents 0a13e6f + 959d075 commit c840a82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/vibe/data/json.d
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ struct JsonSerializer {
void beginWriteArrayEntry(T)(size_t) {}
void endWriteArrayEntry(T)(size_t) { m_compositeStack[$-1].appendArrayElement(m_current); }

void writeValue(T)(T value)
void writeValue(T)(in T value)
{
static if (is(T == Json)) m_current = value;
else static if (isJsonSerializable!T) m_current = value.toJson();
Expand Down

0 comments on commit c840a82

Please sign in to comment.