public void checkKeyFormatting()
        {
            JsonValueWriter writer = new JsonValueWriter();

            writer.InsertKey("Key");

            // then
            Assert.That(writer.ToString(), Is.EqualTo("\"Key\""));
        }
        internal override void WriteJSONString(JsonValueWriter writer)
        {
            writer.OpenObject();

            int writtenElements = 0;

            foreach (KeyValuePair <string, JsonValue> entry in jsonObjectDictionary)
            {
                if (entry.Key != null)
                {
                    if (writtenElements++ > 0)
                    {
                        writer.InsertElementSeperator();
                    }

                    writer.InsertKey(entry.Key);
                    writer.InsertKeyValueSeperator();
                    entry.Value.WriteJSONString(writer);
                }
            }

            writer.CloseObject();
        }