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

This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2022-02-16 22:38:15 +00:00
1 parent 9c4778b129
commit c1f5f9d846
2 files changed
+5 -5

No files matched your search

+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