-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for nested and inlined maps (inside other maps) #252
Conversation
### What's done: - Added a support for nested anonymous Maps
@@ -21,6 +22,7 @@ | |||
@ExperimentalSerializationApi | |||
public class TomlMapDecoder( | |||
private val rootNode: TomlTable, | |||
private val config: TomlInputConfig, |
Check failure
Code scanning / ktlint
[KDOC_NO_CONSTRUCTOR_PROPERTY] all properties from the primary constructor should be documented in a @Property tag in KDoc: add param to KDoc Error
ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/decoders/TomlMapDecoder.kt
Fixed
Show fixed
Hide fixed
ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/decoders/TomlMapDecoder.kt
Fixed
Show fixed
Hide fixed
ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/decoders/TomlMapDecoder.kt
Fixed
Show fixed
Hide fixed
@@ -21,6 +22,7 @@ | |||
@ExperimentalSerializationApi | |||
public class TomlMapDecoder( | |||
private val rootNode: TomlTable, | |||
private val config: TomlInputConfig, |
Check failure
Code scanning / ktlint
[KDOC_NO_CONSTRUCTOR_PROPERTY] all properties from the primary constructor should be documented in a @Property tag in KDoc: add param to KDoc Error
ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/decoders/TomlMapDecoder.kt
Fixed
Show fixed
Hide fixed
ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/decoders/TomlMapDecoder.kt
Fixed
Show fixed
Hide fixed
ktoml-core/src/commonMain/kotlin/com/akuleshov7/ktoml/decoders/TomlMapDecoder.kt
Fixed
Show fixed
Hide fixed
### What's done: - Added a support for nested anonymous Maps
""" | ||
) | ||
is TomlKeyValue -> ((if (index % 2 == 0) processedNode.key.toString() else processedNode.value.content)) as T | ||
is TomlTable -> { |
Check failure
Code scanning / ktlint
[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error
TomlMapDecoder(processedNode, config).decodeSerializableValue(deserializer) | ||
} | ||
} | ||
else -> { |
Check failure
Code scanning / ktlint
[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error
|
||
should be decoded to Map<String, Map<String, Long>>, but not to Map<String, Long> | ||
""" | ||
, rootNode.lineNo) |
Check failure
Code scanning / ktlint
[WRONG_NEWLINES] incorrect line breaking: newline should be placed only after comma Error
""" | ||
) | ||
is TomlKeyValue -> ((if (index % 2 == 0) processedNode.key.toString() else processedNode.value.content)) as T | ||
is TomlTable -> { |
Check failure
Code scanning / ktlint
[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error
TomlMapDecoder(processedNode, config).decodeSerializableValue(deserializer) | ||
} | ||
} | ||
else -> { |
Check failure
Code scanning / ktlint
[NO_BRACES_IN_CONDITIONALS_AND_LOOPS] in if, else, when, for, do, and while statements braces should be used. Exception: single line ternary operator statement: WHEN Error
|
||
should be decoded to Map<String, Map<String, Long>>, but not to Map<String, Long> | ||
""" | ||
, rootNode.lineNo) |
Check failure
Code scanning / ktlint
[WRONG_NEWLINES] incorrect line breaking: newline should be placed only after comma Error
### What's done: - Added a support for nested anonymous Maps
### What's done: - Added a support for nested anonymous Maps
What's done: