Skip to content

Commit

Permalink
Merge pull request #717 from dgileadi/flush-json
Browse files Browse the repository at this point in the history
Flush the writer when a full object is written
  • Loading branch information
joethephish authored Jun 5, 2024
2 parents 652d6c4 + d2750bf commit 8a491db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ink-engine-runtime/SimpleJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@ public void WriteObjectEnd()
Assert(state == State.Object);
_writer.Write("}");
_stateStack.Pop();
if (state == State.None)
_writer.Flush();
}

public void WriteProperty(string name, Action<Writer> inner)
Expand Down

0 comments on commit 8a491db

Please sign in to comment.