Can I read a json file located in commonTest/resou...
# multiplatform
m
Can I read a json file located in commonTest/resources in a KMP project ?
a
Yes, but the method depends on the targets you’re using. If you’re targeting JS then it will require more work. Take a look at these solutions: • https://github.com/goncalossilva/kotlinx-resourceshttps://gist.github.com/dellisd/a1df42787d42b41cd3ce16f573984674https://developer.squareup.com/blog/kotlin-multiplatform-shared-test-resources/ Or you could generate a .kt file that contains the JSON as a variable, by adapting this answer