Skip to content

Commit 4ac2ec8

Browse files
committed
[bugfix]Keep Compatible with 3.5.1 and before when select KotlinX.Serializable option fix#284
1 parent 5ff2283 commit 4ac2ec8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/kotlin/wu/seal/jsontokotlin/model/IConfigManager.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@ interface IConfigManager {
8686
var targetJsonConverterLib: TargetJsonConverter
8787
get() = if (isTestModel) TestConfig.targetJsonConvertLib else {
8888
val value = PropertiesComponent.getInstance().getValue(TARGET_JSON_CONVERTER_LIB_KEY)
89+
//Next step try to keep compatible with 3.5.1 and before version of plugin,
90+
//Please see : https://github.com/wuseal/JsonToKotlinClass/issues/284
91+
val compatibleValue = if (value =="Serilizable") "Serializable" else value
8992
try {
9093
TargetJsonConverter.valueOf(
91-
value
94+
compatibleValue
9295
?: TargetJsonConverter.None.name
9396
)
9497
} catch (e: Exception) {

0 commit comments

Comments
 (0)