summaryrefslogtreecommitdiff
path: root/core/java/android/util/JsonReader.java
Commit message (Collapse)AuthorAgeFilesLines
* Copy StringPool to frameworkNikita Iashchenko2021-04-291-1/+1
| | | | | | | | | | | Libcore class StringPool has single usage outside libcore, in framework. As a part of api cleanup in libcore StringPool is removed from SystemApi, thus, it is copied to com.android.internal.util package. Bug: 154796679 Test: m droid Test: atest FrameworksUtilTests Change-Id: Iaa332eb8ade68f3451639bdce62d5cfea30c2f97
* docs: bug 37077993, object instead of arraykopriva2018-10-031-2/+4
| | | | | | | | | | | also fixing import order to get past repo hooks Test: make ds-docs Bug: 37077993 Change-Id: I0a0d6338f714108eb632caacc6dda4b422dc697b Exempt-From-Owner-Approval: Docs-only change
* Fixed a possible infinite loop in JsonReader#skipValue()Calin Juravle2014-02-181-0/+3
| | | | | Bug: https://code.google.com/p/android/issues/detail?id=65846 Change-Id: Idaa0e75fc5612550c4b9ccb9afa5535ea5b189df
* Fix benign off-by-one in JsonReader.Jesse Wilson2011-07-221-3/+3
| | | | | | | The bug would have caused us to call fillBuffer() earlier than necessary. Change-Id: Ib0e4e54019394d7085913faf90c495d130e8bb75
* Skip byte order mark (BOM) in JsonReaderJesse Wilson2011-07-201-0/+8
| | | | | Bug: http://code.google.com/p/android/issues/detail?id=18508 Change-Id: I7652080d9ab475c75d0a811a6e2ede4975ebe063
* Track line and column when parsing JSON.Jesse Wilson2011-07-181-1/+40
| | | | | | | This is a prerequisite to skipping the BOM if it exists. Bug: http://code.google.com/p/android/issues/detail?id=18508 Change-Id: I38b1c46f246d8526fa20859b50ca3e25c9f9b9d1
* Pool strings in JsonReader.Jesse Wilson2011-04-211-5/+8
| | | | | | | | This yields a 10% improvement in parsing both Twitter and Google Reader streams. Change-Id: Ifc238777e929b5b3e9a4480098b315e418378f8b http://b/3201883
* Don't leak JsonReaders in example code.Jesse Wilson2011-03-161-1/+5
| | | | Change-Id: Id81fb44e26f895d7ac6ecf87eddfa9d14c643159
* Patch new JSON APIs with changes informed by GSON.Jesse Wilson2011-01-101-13/+21
| | | | Change-Id: I86c12a123080cc06ab23d11d1563bb52c5902517
* Decode JSON literal types eagerly and with our own decoder.Jesse Wilson2010-11-181-149/+197
| | | | | | | | | | | | | | | | | | | | Previously we relied on Double.parseDouble() to decode tokens. Since that method is expensive, we deferred calling it unless absolutely necessary. Now we decode the literal type immediately. For efficiency we decode the token right out of the char buffer. This makes things more complicated but it saves many calls to charAt(). With this change overall performance is 7% faster for JSON documents cited in the bug. benchmark run ms linear runtime % GsonParseFull no switch, no int parse 309 ============================ 93% GsonParseFull baseline 330 ============================== 100% http://b/3201883 Change-Id: I436b6769956b1357a17c807a327d3a234691c73f
* Fix typos in JSON documentation.Jesse Wilson2010-10-151-2/+2
| | | | Change-Id: Ife519f755b1974adee13553cd4dfa2b15dd23aac
* Optimizing skipValue() to avoid allocation.Jesse Wilson2010-08-061-13/+23
| | | | | | | | I ran a quick benchmark on a desktop VM: this shortened the time to parse a complete JSON document by ~25%. Change-Id: Id479734654addfe86f4bf251f0dd6e78843023bf http://microbenchmarks.appspot.com/run/jessewilson@google.com/twitter.JsonParseBenchmark/366001
* Adding JsonReader.setLenient() to handle malformed JSON strings.Jesse Wilson2010-08-061-61/+103
| | | | | | | Also replacing setIndentSpaces() with a more general purpose method, setIndent(). Change-Id: I64fbe4901aec23de5392362c1d40b77bc2b5566b
* A new streaming JSON API.Jesse Wilson2010-08-061-0/+1006
Change-Id: Iefa7ee44ddacbe22ea9ebca3165ac59030659bf2