1 //----------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation.  All rights reserved.
3 //----------------------------------------------------------------
4 
5 namespace System.Runtime.Serialization.Json
6 {
7     using System.Runtime.Serialization;
8     using System.Xml;
9     using System.Security;
10     using System.Reflection;
11 
12     static class JsonGlobals
13     {
14         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent"
15             + " data from being modified or leaked to other components in appdomain.")]
16         public static readonly int DataContractXsdBaseNamespaceLength = Globals.DataContractXsdBaseNamespace.Length;
17 
18         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent"
19             + " data from being modified or leaked to other components in appdomain.")]
20         public static readonly XmlDictionaryString dDictionaryString = new XmlDictionary().Add("d");
21 
22         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent"
23             + " data from being modified or leaked to other components in appdomain.")]
24         public static readonly char[] floatingPointCharacters = new char[] { '.', 'e' };
25 
26         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent"
27             + " data from being modified or leaked to other components in appdomain.")]
28         public static readonly XmlDictionaryString itemDictionaryString = new XmlDictionary().Add("item");
29 
30         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent"
31             + " data from being modified or leaked to other components in appdomain.")]
32         public static readonly XmlDictionaryString rootDictionaryString = new XmlDictionary().Add("root");
33 
34         [Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - Static fields are marked SecurityCritical or readonly to prevent"
35             + " data from being modified or leaked to other components in appdomain.")]
36         public static readonly long unixEpochTicks = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).Ticks;
37 
38         public const string applicationJsonMediaType = "application/json";
39         public const string arrayString = "array";
40         public const string booleanString = "boolean";
41         public const string CacheControlString = "Cache-Control";
42         public const byte CollectionByte = (byte)CollectionChar;
43         public const char CollectionChar = '[';
44         public const string DateTimeEndGuardReader = ")/";
45         public const string DateTimeEndGuardWriter = ")\\/";
46         public const string DateTimeStartGuardReader = "/Date(";
47         public const string DateTimeStartGuardWriter = "\\/Date(";
48         public const string dString = "d";
49         public const byte EndCollectionByte = (byte)EndCollectionChar;
50         public const char EndCollectionChar = ']';
51         public const byte EndObjectByte = (byte)EndObjectChar;
52         public const char EndObjectChar = '}';
53         public const string ExpiresString = "Expires";
54         public const string IfModifiedSinceString = "If-Modified-Since";
55         public const string itemString = "item";
56         public const string jsonerrorString = "jsonerror";
57         public const string KeyString = "Key";
58         public const string LastModifiedString = "Last-Modified";
59         public const int maxScopeSize = 25;
60         public const byte MemberSeparatorByte = (byte)MemberSeparatorChar;
61         public const char MemberSeparatorChar = ',';
62         public const byte NameValueSeparatorByte = (byte)NameValueSeparatorChar;
63         public const char NameValueSeparatorChar = ':';
64         public const string NameValueSeparatorString = ":";
65         public const string nullString = "null";
66         public const string numberString = "number";
67         public const byte ObjectByte = (byte)ObjectChar;
68         public const char ObjectChar = '{';
69         public const string objectString = "object";
70         public const string publicString = "public";
71         public const byte QuoteByte = (byte)QuoteChar;
72         public const char QuoteChar = '"';
73         public const string rootString = "root";
74         public const string serverTypeString = "__type";
75         public const string stringString = "string";
76         public const string textJsonMediaType = "text/json";
77         public const string trueString = "true";
78         public const string typeString = "type";
79         public const string ValueString = "Value";
80         public const char WhitespaceChar = ' ';
81         public const string xmlnsPrefix = "xmlns";
82         public const string xmlPrefix = "xml";
83     }
84 }
85