File tree Expand file tree Collapse file tree 4 files changed +21
-33
lines changed Expand file tree Collapse file tree 4 files changed +21
-33
lines changed Original file line number Diff line number Diff line change 1- ## C# v1.2.2
2- _ ` 2020.2.28 UTC+8 10:50 ` _
3- * Change the ` Data ` type from ` class ` to ` struct ` , and use ` ref ` to pass it.
4- * Use keyword ` out ` inline to follow the compiler hits.
1+ ## v1.2.3
2+ _ ` 2021.2.5 UTC+8 10:13 ` _
3+ * ** The C Code**
4+ * Fix the parse key bug of ParseObject.
5+
6+ * ** The C# Code**
7+ * Code formatting of #region.
58
9+ ## v1.2.2
10+ _ ` 2020.2.28 UTC+8 10:50 ` _
11+ * ** The C# Code**
12+ * Change the ` Data ` type from ` class ` to ` struct ` , and use ` ref ` to pass it.
13+ * Use keyword ` out ` inline to follow the compiler hits.
614
7- ## C v1.2.0
815_ ` 2020.1.10 UTC+8 11:35 ` _
9- * Add the C code implementation.
16+ * ** The C Code**
17+ * Add the C code implementation.
1018
1119
1220## v1.2.0
Original file line number Diff line number Diff line change 77 * GitHub : https://github.com/scottcgi/MojoJson
88 *
99 * Since : 2013-5-29
10- * Update : 2020-1-8
10+ * Update : 2021-2-6
1111 * Author : scott.cgi
12- * Version: 1.2.0
12+ * Version: 1.2.3
1313 */
1414
1515
@@ -798,7 +798,7 @@ static JsonValue* ParseObject(const char** jsonPtr)
798798
799799 const char * strStart ;
800800 int keyLen = SkipString (jsonPtr , & strStart );
801- char key [keyLen ];
801+ char key [keyLen + 1 ];
802802 // make string end
803803 key [keyLen ] = '\0' ;
804804
Original file line number Diff line number Diff line change 77 * GitHub : https://github.com/scottcgi/MojoJson
88 *
99 * Since : 2013-1-26
10- * Update : 2020-1-8
10+ * Update : 2021-2-6
1111 * Author : scott.cgi
12- * Version: 1.2.0
12+ * Version: 1.2.3
1313 */
1414
1515
Original file line number Diff line number Diff line change 99 * Since : 2017-9-6
1010 * Update : 2020-2-28
1111 * Author : scott.cgi
12- * Version: 1.2.2
12+ * Version: 1.2.3
1313 */
1414
1515using System . Collections . Generic ;
@@ -26,8 +26,6 @@ public static class Json
2626
2727
2828 #region Parse Json API
29-
30-
3129 /// <summary>
3230 /// Parse json string.
3331 /// </summary>
@@ -44,14 +42,10 @@ public static void SetEscapeString(bool isEscapeString)
4442 {
4543 Json . isEscapeString = isEscapeString ;
4644 }
47-
48-
4945 #endregion
5046
5147
5248 #region Parse Json
53-
54-
5549 /// <summary>
5650 /// Parse the JsonValue.
5751 /// </summary>
@@ -574,8 +568,6 @@ private static char GetUnicodeCodePoint(ref Data data)
574568 ( data . unicode [ 3 ] )
575569 ) ;
576570 }
577-
578-
579571 #endregion
580572
581573
@@ -630,8 +622,6 @@ public JsonValue(JsonType type, float value)
630622
631623
632624 #region JsonObject API
633-
634-
635625 /// <summary>
636626 /// Use JsonValue as JsonObject.
637627 /// </summary>
@@ -803,14 +793,10 @@ public bool AsObjectGetIsNull(string key)
803793
804794 return false ;
805795 }
806-
807-
808796 #endregion
809797
810798
811799 #region JsonArray API
812-
813-
814800 /// <summary>
815801 /// Use JsonValue as JsonArray.
816802 /// </summary>
@@ -892,14 +878,10 @@ public bool AsArrayGetIsNull(int index)
892878 {
893879 return this . AsArrayGet ( index ) . IsNull ( ) ;
894880 }
895-
896-
897881 #endregion
898882
899883
900- #region Other Json value API
901-
902-
884+ #region Other Json Value API
903885 /// <summary>
904886 /// Get JsonValue as string.
905887 /// </summary>
@@ -947,8 +929,6 @@ public bool IsNull()
947929 {
948930 return this . type == JsonType . Null ;
949931 }
950-
951-
952932 #endregion
953933 }
954934
You can’t perform that action at this time.
0 commit comments