Compartilhar via


JsonReader.Lenient Property

Definition

Returns true if this parser is liberal in what it accepts. -or- Configure this parser to be be liberal in what it accepts.

public bool Lenient { [Android.Runtime.Register("isLenient", "()Z", "")] get; [Android.Runtime.Register("setLenient", "(Z)V", "")] set; }
[<get: Android.Runtime.Register("isLenient", "()Z", "")>]
[<set: Android.Runtime.Register("setLenient", "(Z)V", "")>]
member this.Lenient : bool with get, set

Property Value

Attributes

Remarks

Property getter documentation:

Returns true if this parser is liberal in what it accepts.

Java documentation for android.util.JsonReader.isLenient().

Property setter documentation:

Configure this parser to be be liberal in what it accepts. By default, this parser is strict and only accepts JSON as specified by RFC 4627. Setting the parser to lenient causes it to ignore the following syntax errors:

<ul> <li>End of line comments starting with // or # and ending with a newline character. <li>C-style comments starting with /* and ending with */. Such comments may not be nested. <li>Names that are unquoted or 'single quoted'. <li>Strings that are unquoted or 'single quoted'. <li>Array elements separated by ; instead of ,. <li>Unnecessary array separators. These are interpreted as if null was the omitted value. <li>Names and values separated by = or => instead of :. <li>Name/value pairs separated by ; instead of ,. </ul>

Java documentation for android.util.JsonReader.setLenient(boolean).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to