- Timestamp:
- Jan 19, 2019, 6:12:21 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/JSON/JSONNull.cs
r326 r351 3 3 namespace AllocsFixes.JSON { 4 4 public class JSONNull : JSONValue { 5 public override void ToString (StringBuilder stringBuilder, bool prettyPrint = false, intcurrentLevel = 0) {6 stringBuilder.Append ("null");5 public override void ToString (StringBuilder _stringBuilder, bool _prettyPrint = false, int _currentLevel = 0) { 6 _stringBuilder.Append ("null"); 7 7 } 8 8 9 public static JSONNull Parse (string json, ref intoffset) {9 public static JSONNull Parse (string _json, ref int _offset) { 10 10 //Log.Out ("ParseNull enter (" + offset + ")"); 11 11 12 if (! json.Substring (offset, 4).Equals ("null")) {12 if (!_json.Substring (_offset, 4).Equals ("null")) { 13 13 throw new MalformedJSONException ("No valid null value found"); 14 14 } 15 15 16 16 //Log.Out ("JSON:Parsed Null"); 17 offset += 4;17 _offset += 4; 18 18 return new JSONNull (); 19 19 }
Note:
See TracChangeset
for help on using the changeset viewer.