1 #region Copyright notice and license 2 // Protocol Buffers - Google's data interchange format 3 // Copyright 2015 Google Inc. All rights reserved. 4 // 5 // Use of this source code is governed by a BSD-style 6 // license that can be found in the LICENSE file or at 7 // https://developers.google.com/open-source/licenses/bsd 8 #endregion 9 10 using System.IO; 11 12 namespace Google.Protobuf 13 { 14 /// <summary> 15 /// Thrown when an attempt is made to parse invalid JSON, e.g. using 16 /// a non-string property key, or including a redundant comma. Parsing a protocol buffer 17 /// message represented in JSON using <see cref="JsonParser"/> can throw both this 18 /// exception and <see cref="InvalidProtocolBufferException"/> depending on the situation. This 19 /// exception is only thrown for "pure JSON" errors, whereas <c>InvalidProtocolBufferException</c> 20 /// is thrown when the JSON may be valid in and of itself, but cannot be parsed as a protocol buffer 21 /// message. 22 /// </summary> 23 public sealed class InvalidJsonException : IOException 24 { InvalidJsonException(string message)25 internal InvalidJsonException(string message) 26 : base(message) 27 { 28 } 29 } 30 }