summaryrefslogtreecommitdiff
path: root/formats
AgeCommit message (Collapse)Author
2023-09-12Add support of WASM target to mainline (#2410)igoriakovlev
* Implement wasm target * Slightly fix test data to suite wasm fp parser Wasm fp parser has a different algorithm, so fix the tests to have similar results for all platforms * Update okio version to 3.5.0 * Kotlin 1.9.30+ support
2023-08-14Fix negative enums in protobuf not serializing & de-serializing (#2400)Doğaç Eldenk
From language guide: Enumerator constants must be in the range of a 32-bit integer. Since enum values use varint encoding on the wire, negative values are inefficient and thus not recommended (but still possible).
2023-08-11Rename JsonLexer.kt file to avoid confusion — we do not have this class ↵Leonid Startsev
anymore, it was split to ReaderJsonLexer and StringJsonLexer.
2023-08-11Test & fix several exception messages from Json parserLeonid Startsev
To avoid cryptic and incorrect ones, such as `Expected quotation mark '"', but had '"' instead` or `unexpected token: 10`. Fixes #2360 Fixes #2399 Also remove @PublishedApi from BATCH_SIZE to remove it from public API dump.
2023-08-03Add annotations from expect entity to actual entity. Required after KT-58551 ↵Margarita Bobova
(#2388)
2023-08-02Added annotation for named companion objects (#2381)Sergey Shanshin
The annotation will be added to the named companion class by the compiler starting from 1.9.20
2023-08-02Follow-up for #2379 — actually remove org.intellij.lang.annotations from ↵Leonid Startsev
JS and Native (#2390)
2023-08-02Merge remote-tracking branch 'origin/master' into devLeonid Startsev
2023-08-02Remove obsolete no longer supported ↵Stanislav Erokhin
kotlin.mpp.enableCompatibilityMetadataVariant that will be promoted to ERROR as part of KT-55891 (#2389)
2023-08-02Properly fix Java 8 API compatibility (#2350)Björn Kautler
There are 7 methods in ByteBuffer that have the problem described in #2218 and was attempted to be fixed in #2219. Unfortunately, the fix in #2219 was incomplete as another of these 7 methods is used in the same class. Also it could happen anytime and with similar cases, that this happens again and is only recognized very late.
2023-07-26Rename clashed files to fix per-file compilation for JS targetArtem Kobzar
(cherry picked from commit 4af0f30b11ef2cdddc6d01f444783702f493d0a2)
2023-07-26Changed actual FormatLanguage annotation for JS and native (#2379)Sergey Shanshin
The declaration of annotation `org.intellij.lang.annotations.Language` in the JS and native source has been removed, because if this annotation is declared in other dependency, then this leads to compilation errors. Fixes #2377
2023-07-24Rename clashed files to fix per-file compilation for JS targetArtem Kobzar
2023-07-24Update to Kotlin 1.9.0: (#2364)Leonid Startsev
- Apply @ExperimentalNativeApi on WeakReference usages - Drop Legacy JS compiler as it is deprecated - Update API Dump with .entries enum properties - Update yarn.lock
2023-07-17Use forgotten 'mode' in 'parameterizedTest' (#2367)Leonid Startsev
2023-07-14Actualize Protobuf documentation (#2355)Leonid Startsev
Fixes #2352
2023-07-14Fix error triggered by 'consume leading class discriminator' polymorphic ↵Leonid Startsev
parsing optimization: (#2362) In case of an empty object, no exception should be thrown, it should be treated as missing class discriminator. peekString() correctly handles this case. Also fixes misplaced calls in lenient vs non-lenient mode. Fixes #2353
2023-07-12Support Serializer for Nothing on the JS target (#2330)Shreck Ye
Workaround for KT-51333: serialization of `Nothing` on the JS target and related tests See also #932 Co-authored-by: Leonid Startsev <sandwwraith@users.noreply.github.com>
2023-07-05Introduce 'decodeEnumsCaseInsensitive' feature to Json. (#2345)Leonid Startsev
It allows decoding enum values in a case-insensitive manner. It does not affect CLASS kinds or encoding. It is one of the most-voted feature requests. Also enhance JsonNamingStrategy documentation. Fixes #209
2023-06-29Fix beginStructure in JsonTreeDecoder when inner structure descriptor is ↵Ugljesa Jovanovic
same as outer (#2346) Instead of returning the same instance of decoder (with invalid position) a new instance is created, and polyDiscriminator and polyDescriptor are passed to the new instance. This way check for unknown keys in endStructure can properly filter out polymorphic discriminator (by default "type) from potential unknown keys. Fixes #2343
2023-06-23Fix Kotlin user projects build (#2341)Abduqodiri Qurbonzoda
* Remove @SharedImmutable usages The annotation is deprecated and has no effect. * Suppress animal sniffer error in a data class with boolean property The error is a result of changes in data class hashCode generation. The generated code now uses the static Boolean.hashCode() to calculate hash code of boolean properties. The static function is available only since Java 1.8.
2023-06-23Update user projects config: adapt build script to new TeamCity variables ↵Margarita Bobova
(#2342) Co-authored-by: Leonid Startsev <sandwwraith@gmail.com>
2023-06-22Increase visibility of the json-okio integration module: add it to the Dokka ↵Leonid Startsev
generated website
2023-06-22Merge remote-tracking branch 'origin/master' into devLeonid Startsev
2023-06-19Update json5k, which now supports Kotlin/Native (#2335)Adam
2023-06-13Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (#2328)Sergey Shanshin
Fixes #2326 An explicit cast is needed here due to an API change in Java 9, see #2218. In Java 8 and earlier, the `position(I)` method was final in `Buffer`, and returned a `Buffer`. In Java 9 and later, the method was opened, and `ByteBuffer` overrides it, returning a `ByteBuffer`. This causes a `NoSuchMethodError` when running a class, compiled with a newer Java version, on Java 8.
2023-06-13Fixed regression with serialization using list parametrized with contextual ↵Sergey Shanshin
types (#2331) Fixes #2323 In the current implementation of serializer lookup caching, if the serializer for the parameter was not found, the `serializerOrNull` function always returned null, without further searching for contextual serializers in the current SerializersModule.
2023-05-25Fix typo in JsonElementSerializer (#2314)Vinccool96
2023-05-17Add support to decode numeric literals containing an exponent (#2227)Roberto Blázquez
Fixes #2078
2023-05-11Prepare 1.5.1 release (#2297)upstream/v1.5.1Leonid Startsev
- Add changelog - Update to Kotlin 1.8.21 - Update api dump - Update yarn lock - Update Gradle in integration test
2023-05-10Added FormatLanguage annotation to JSON (#2234)Sergey Shanshin
Resolves #2166 Co-authored-by: Leonid Startsev <sandwwraith@gmail.com>
2023-05-09Merge remote-tracking branch 'origin/master' into devLeonid Startsev
2023-05-09Implement addAll functions for JsonArrayBuilder (#2156)aSemy
Fixes #2127
2023-04-25Properties Format: Support sealed/polymorphic classes as class properties ↵EdwarDDay
(#2255)
2023-04-20Adapt tests for K2 and upcoming deprecations in K1 (#2230)Leonid Startsev
- Move meta-serializable annotations to top-level. - Specify argument for `@Serializable` when companion serializer is used.
2023-04-20Fix value class encoding in various corner cases (#2242)Leonid Startsev
- Value class is located at top-level, but wraps non-primitive and thus does not fall in 'primitive on top-level' branch - Value class is a subclass in a polymorphic hierarchy, but either is primitive or explicitly recorded without type info Note that type info is omitted in the latter case and 'can't add type info to primitive' error is not thrown deliberately, as there seems to be use-cases for that. Fixes #1774 Fixes #2159
2023-04-19Improved docs for JsonContentPolymorphicSerializer (#2189)Sergey Shanshin
Relates #834
2023-04-19Fix incorrect json decoding iterator's .hasNext() behavior on array-wrapped ↵Leonid Startsev
inputs: (#2268) hasNext() shouldn't throw exception if it was called more than once after the stream has ended. Fixes #2267
2023-04-10Replace deprecated ThreadLocal with kotlin.native.concurrent.ThreadLocal (#2266)Margarita Bobova
2023-03-29Get rid of deprecated toChar() in JS-specific code (#2252)Leonid Startsev
Apparently -Werror flag is not applied to JS sources in kotlin.js.compiler=both mode
2023-03-27Rename json-okio `target` variables to `sink` (#2226)Ben Woodworth
The Okio codebase names Sink/BufferedSink variables "sink", so this aligns the naming convention
2023-03-08Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (#2219)madhead
Fixes #2218
2023-03-06Suppressed Animal Sniffer error on ULong.toString()Sergey.Shanshin
2023-03-06Converted Serialization formats list to tableSergey.Shanshin
PR #2010
2023-03-06Converted Serialization formats list to tableSergey.Shanshin
PR #2010
2023-03-01Add functions for creating JsonPrimitives from unsigned numbers (#2160)aSemy
2023-02-28Fix MissingFieldException duplication (#2213)Vsevolod Tolstopyatov
Fixes #2212
2023-02-24Removed redundant usages of @Serializer annotations (#2200)Sergey Shanshin
If all KSerializer members are overridden in custom serializer, then the annotation '@Serializer' is not needed
2023-02-23Introduce HoconEncoder and HoconDecoder interfaces (#2094)Alexander Mikhailov
Analogues for JsonEncoder/Decoder should ease writing hocon-specific serializers for various classes. Add java.time.Duration and ConfigMemorySize serializers for HOCON. --------- Co-authored-by: Leonid Startsev <sandwwraith@users.noreply.github.com>
2023-02-16Added ability to read buffered huge strings in custom KSerializers (#2012)Alexey Sviridov
Added stream-friendly version of decodeString for new ChunkedDecoder interface. Fixes #1987 Co-authored-by: Leonid Startsev <sandwwraith@users.noreply.github.com>