flip condition for JSON encoding to make android (tagged objects) default (#319)

This commit is contained in:
Evgeny Poberezkin
2022-02-16 22:38:15 +00:00
committed by GitHub
parent 9c4778b129
commit c1f5f9d846
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -27,8 +27,8 @@ extra-source-files:
README.md
CHANGELOG.md
if (os(linux))
ghc-option: -DANDROID
if (os(darwin))
ghc-option: -DIOS
library
exposed-modules:
+3 -3
View File
@@ -98,10 +98,10 @@ enumJSON tagModifier =
}
sumTypeJSON :: (String -> String) -> J.Options
#if defined(ANDROID)
sumTypeJSON = taggedObjectJSON
#else
#if defined(IOS)
sumTypeJSON = singleFieldJSON
#else
sumTypeJSON = taggedObjectJSON
#endif
taggedObjectJSON :: (String -> String) -> J.Options