# Kotlin Js(via multi platform) and console.log

**URL:** https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324
**Category:** Uncategorized
**Created:** [November 14, 2018, 7:39pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324 "2018-11-14T19:39:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![huggy](https://avatars.discourse-cdn.com/v4/letter/h/ed8c4c/32.png) [@huggy](https://discuss.kotlinlang.org/u/huggy)
#### Post date: [November 14, 2018, 7:39pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324/1 "2018-11-14T19:39:22Z")

</div>

![Blender%20Blog%202018-11-14%2014-30-11](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/9/961bffefc3b296c5e980e45aea4237259868b546.png)

```
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class BlogPostDto (override var id:Long, override var dateCreated: Long, override var dateUpdated: Long): DataTransportObject{
    var title:String = ""
    var description:String = ""
    var content:String = ""
    @SerialName("secRoleDetailAuthor")
    var secRoleDetailAuthor:DtoMin = DtoMin(0,0,0)
}

interface DataTransportObject {
var id: Long
var dateCreated: Long
var dateUpdated: Long
}

```

When trying to log data classes in my Multi-Platform kotlin react project i see the results just like the screen shot. I am assuming i did something wrong, just not sure what…

---

<div class="post-metadata">

### Author: ![Alexey.Belkov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/alexey.belkov/32/5215_2.png) [@Alexey.Belkov](https://discuss.kotlinlang.org/u/Alexey.Belkov)
#### Post date: [November 23, 2018, 12:01pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324/2 "2018-11-23T12:01:02Z")

</div>

Hi, it’s a bit unclear what the problem is. Can you please explain what did you expect to see instead?

---

<div class="post-metadata">

### Author: ![huggy](https://avatars.discourse-cdn.com/v4/letter/h/ed8c4c/32.png) [@huggy](https://discuss.kotlinlang.org/u/huggy)
#### Post date: [January 4, 2019, 4:49am UTC](https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324/3 "2019-01-04T04:49:52Z")

</div>

Should i be concerned about the generated fields like id\_7dug6t???

---

<div class="post-metadata">

### Author: ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)
#### Post date: [January 9, 2019, 2:27pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324/4 "2019-01-09T14:27:15Z")

</div>

When you pass an object to `console.log` it shows it as is at runtime so in your case it works as expected, If you need serialized/JSON version you can write something like `console.log(JSON.stringify(yourObject))`

---

<div class="post-metadata">

### Author: ![bashor](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/bashor/32/1431_2.png) [@bashor](https://discuss.kotlinlang.org/u/bashor)
#### Post date: [January 9, 2019, 2:30pm UTC](https://discuss.kotlinlang.org/t/kotlin-js-via-multi-platform-and-console-log/10324/5 "2019-01-09T14:30:10Z")

</div>

The related issue: [kotlinx.serialization/issues/116](https://github.com/Kotlin/kotlinx.serialization/issues/116)
