About kotlin native json serialization, i get an e...
# kotlin-native
k
About kotlin native json serialization, i get an error, not sure if I am doing something wrong
Copy code
example-native# ./gradlew run

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileKonanSampleLinux_x64'.
> Could not resolve all files for configuration ':artifactsample_linux_x64'.
   > Could not resolve org.jetbrains.kotlinx:jsonparser-native:0.5.0.
     Required by:
         project :
      > Unable to find a matching configuration of org.jetbrains.kotlinx:jsonparser-native:0.5.0:
          - Configuration 'jsonparser-native_ios_arm64-runtime':
              - Required org.gradle.native.debuggable 'false' and found compatible value 'false'.
              - Required org.gradle.native.kotlin.platform 'linux_x64' and found incompatible value 'ios_arm64'.
              - Required org.gradle.native.linkage 'STATIC' and found compatible value 'STATIC'.
              - Required org.gradle.native.optimized 'false' and found compatible value 'false'.
              - Found org.gradle.status 'release' but wasn't required.
              - Required org.gradle.usage 'native-link' and found compatible value 'native-link'.
          - Configuration 'jsonparser-native_ios_x64-runtime':
              - Required org.gradle.native.debuggable 'false' and found compatible value 'false'.
              - Required org.gradle.native.kotlin.platform 'linux_x64' and found incompatible value 'ios_x64'.
              - Required org.gradle.native.linkage 'STATIC' and found compatible value 'STATIC'.
              - Required org.gradle.native.optimized 'false' and found compatible value 'false'.
              - Found org.gradle.status 'release' but wasn't required.
              - Required org.gradle.usage 'native-link' and found compatible value 'native-link'.
          - Configuration 'jsonparser-native_macos_x64-runtime':
              - Required org.gradle.native.debuggable 'false' and found compatible value 'false'.
              - Required org.gradle.native.kotlin.platform 'linux_x64' and found incompatible value 'macos_x64'.
              - Required org.gradle.native.linkage 'STATIC' and found compatible value 'STATIC'.
              - Required org.gradle.native.optimized 'false' and found compatible value 'false'.
              - Found org.gradle.status 'release' but wasn't required.
              - Required org.gradle.usage 'native-link' and found compatible value 'native-link'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

BUILD FAILED in 0s
2 actionable tasks: 2 executed
any hint is welcome
Copy code
# konanc -version
info: kotlinc-native 1.2.60-dev-444 (JRE 1.8.0_171-b11)
Kotlin/Native: 0.7.1
s
I’m afraid
jsonparser
artifact is not available on linux (only for macos and ios)
you can try to build one by yourself and publish to local maven repo
n
Alvaro - You could look at this OpenFaaS Weather sample which uses the cJSON library for JSON parsing: https://gitlab.com/napperley/openfaas-weather-sample/tree/1baa610182901e52399026afbc58a7b77a459fc6
k
hey thanks for sharing. I have tested few C json libs, yajl and jsmn, and for my modest requirements works fine.
saw a bit your project, seems you have implemented quite some nice stuff, so for sure i will have a deep look