From a25c6b4665ed19583469d6abc5df1172c0f991f6 Mon Sep 17 00:00:00 2001 From: goyuken Date: Mon, 18 Aug 2014 18:00:22 +0000 Subject: [PATCH] TextState (common to GB, WS, etc): clean up JSON formatting slightly. not a breaking change. --- BizHawk.Emulation.Common/TextState.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BizHawk.Emulation.Common/TextState.cs b/BizHawk.Emulation.Common/TextState.cs index 0e80e21a94..e5fb2c9453 100644 --- a/BizHawk.Emulation.Common/TextState.cs +++ b/BizHawk.Emulation.Common/TextState.cs @@ -22,6 +22,14 @@ namespace BizHawk.Emulation.Common { public Dictionary Data = new Dictionary(); public Dictionary Objects = new Dictionary(); + public bool ShouldSerializeData() + { + return Data.Count > 0; + } + public bool ShouldSerializeObjects() + { + return Objects.Count > 0; + } } public Node Root = new Node();