JsonOutputMode.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Copyright 2010-present MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using System;
  16. namespace MongoDB.Bson.IO
  17. {
  18. /// <summary>
  19. /// Represents the output mode of a JsonWriter.
  20. /// </summary>
  21. public enum JsonOutputMode
  22. {
  23. /// <summary>
  24. /// Output strict JSON (an obsolete output mode that is similar to canonical extended JSON).
  25. /// </summary>
  26. [Obsolete("Use CanonicalExtendedJson instead.")]
  27. Strict,
  28. /// <summary>
  29. /// Use a format that can be pasted in to the MongoDB shell.
  30. /// </summary>
  31. Shell,
  32. /// <summary>
  33. /// Output canonical extended JSON.
  34. /// </summary>
  35. CanonicalExtendedJson,
  36. /// <summary>
  37. /// Output relaxed extended JSON.
  38. /// </summary>
  39. RelaxedExtendedJson,
  40. /// <summary>
  41. /// Use JavaScript data types for some values.
  42. /// </summary>
  43. [Obsolete("Use Shell instead.")]
  44. JavaScript = Shell,
  45. /// <summary>
  46. /// Use JavaScript and MongoDB data types for some values.
  47. /// </summary>
  48. [Obsolete("Use Shell instead.")]
  49. TenGen = Shell
  50. }
  51. }