Skip to content
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

KotlinxSerializer fails to parse JSON on iOS #632

Closed
samus opened this issue Oct 8, 2018 · 4 comments
Closed

KotlinxSerializer fails to parse JSON on iOS #632

samus opened this issue Oct 8, 2018 · 4 comments
Assignees
Labels

Comments

@samus
Copy link

samus commented Oct 8, 2018

The utf-8 charset parameter should be passed to the readText method in the response otherwise an error will happen on iOS complaining that the character set is not utf-8 which is required for JSON.

KotlinXSerializer.kt
val text = response.readText(charset = Charsets.UTF_8)

@e5l e5l self-assigned this Oct 9, 2018
@e5l e5l added the bug label Oct 9, 2018
@yuriry
Copy link

yuriry commented Oct 10, 2018

@samus I'm running into this problem when building an iOS framework with ktor. Since you can run your project on iOS, could you please share the configuration that you use to compile the project? I'm looking for kotlin_version, kotlin_native_version, ktor_version and serialization_version. Thank you in advance!

@samus
Copy link
Author

samus commented Oct 10, 2018

I can actually share the full code since it is just a demo app for conference talk I'm giving soon. https:/samus/mpp_chuck_demo

@yuriry
Copy link

yuriry commented Oct 10, 2018

@samus Thank you for sharing the project, it was very helpful. My undefined symbols problem was resolved by changing ext.ktor_version = "0.9.5-rc13" to ext.ktor_version = "0.9.5-rc13-conf2". It may still fail at run time as mentioned by @Alex009, but at least it is a step forward.

@e5l
Copy link
Member

e5l commented Oct 15, 2018

Fixed in 1.0.0-alpha-3

@e5l e5l closed this as completed Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants