source: binary-improvements/7dtd-server-fixes/src/JSON/JSONNull.cs@ 381

Last change on this file since 381 was 351, checked in by alloc, 6 years ago

Fixed game version compatibility of GamePrefs
Code style cleanup (mostly argument names)

File size: 575 bytes
Line 
1using System.Text;
2
3namespace AllocsFixes.JSON {
4 public class JSONNull : JSONValue {
5 public override void ToString (StringBuilder _stringBuilder, bool _prettyPrint = false, int _currentLevel = 0) {
6 _stringBuilder.Append ("null");
7 }
8
9 public static JSONNull Parse (string _json, ref int _offset) {
10 //Log.Out ("ParseNull enter (" + offset + ")");
11
12 if (!_json.Substring (_offset, 4).Equals ("null")) {
13 throw new MalformedJSONException ("No valid null value found");
14 }
15
16 //Log.Out ("JSON:Parsed Null");
17 _offset += 4;
18 return new JSONNull ();
19 }
20 }
21}
Note: See TracBrowser for help on using the repository browser.