You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
3.1 KiB

  1. #region License
  2. // Copyright (c) 2007 James Newton-King
  3. //
  4. // Permission is hereby granted, free of charge, to any person
  5. // obtaining a copy of this software and associated documentation
  6. // files (the "Software"), to deal in the Software without
  7. // restriction, including without limitation the rights to use,
  8. // copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. // copies of the Software, and to permit persons to whom the
  10. // Software is furnished to do so, subject to the following
  11. // conditions:
  12. //
  13. // The above copyright notice and this permission notice shall be
  14. // included in all copies or substantial portions of the Software.
  15. //
  16. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  17. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  18. // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  19. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  20. // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  21. // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  23. // OTHER DEALINGS IN THE SOFTWARE.
  24. #endregion
  25. using System;
  26. using System.Collections.Generic;
  27. using System.Text;
  28. namespace Newtonsoft.Json
  29. {
  30. /// <summary>
  31. /// Specifies the type of JSON token.
  32. /// </summary>
  33. internal enum JsonToken
  34. {
  35. /// <summary>
  36. /// This is returned by the <see cref="JsonReader"/> if a read method has not been called.
  37. /// </summary>
  38. None = 0,
  39. /// <summary>
  40. /// An object start token.
  41. /// </summary>
  42. StartObject = 1,
  43. /// <summary>
  44. /// An array start token.
  45. /// </summary>
  46. StartArray = 2,
  47. /// <summary>
  48. /// A constructor start token.
  49. /// </summary>
  50. StartConstructor = 3,
  51. /// <summary>
  52. /// An object property name.
  53. /// </summary>
  54. PropertyName = 4,
  55. /// <summary>
  56. /// A comment.
  57. /// </summary>
  58. Comment = 5,
  59. /// <summary>
  60. /// Raw JSON.
  61. /// </summary>
  62. Raw = 6,
  63. /// <summary>
  64. /// An integer.
  65. /// </summary>
  66. Integer = 7,
  67. /// <summary>
  68. /// A float.
  69. /// </summary>
  70. Float = 8,
  71. /// <summary>
  72. /// A string.
  73. /// </summary>
  74. String = 9,
  75. /// <summary>
  76. /// A boolean.
  77. /// </summary>
  78. Boolean = 10,
  79. /// <summary>
  80. /// A null token.
  81. /// </summary>
  82. Null = 11,
  83. /// <summary>
  84. /// An undefined token.
  85. /// </summary>
  86. Undefined = 12,
  87. /// <summary>
  88. /// An object end token.
  89. /// </summary>
  90. EndObject = 13,
  91. /// <summary>
  92. /// An array end token.
  93. /// </summary>
  94. EndArray = 14,
  95. /// <summary>
  96. /// A constructor end token.
  97. /// </summary>
  98. EndConstructor = 15,
  99. /// <summary>
  100. /// A Date.
  101. /// </summary>
  102. Date = 16,
  103. /// <summary>
  104. /// Byte data.
  105. /// </summary>
  106. Bytes = 17
  107. }
  108. }