You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data class JsonToKotlinMain (val someString: String, val someBoolean: Boolean, val someNumber: Int, val someArrayOfNumber: Array<Int>, ), data class JsonToKotlinMain (val someString: String, val someBoolean: Boolean, val someNumber: Int, val someArrayOfNumber: Array<Int>, ) data class JsonToKotlinBaseSomeObject (val someNestedNumber: Int, val someNestedString: String, ) data class JsonToKotlin2 (val someObject: JsonToKotlinBaseSomeObject, )
Note that the first object is repeated twice.
Is there any way to create stop this appending behavior?
The text was updated successfully, but these errors were encountered:
Using the below function in a node project.
`
const jsonToKotlin = require('json-to-kotlin-class')
export const getDataClass = (json: object): string => {
return jsonToKotlin.inti(json)
}
`
`
describe("j2k file", () => {
it("should generate data classes", () => {
})
})
`
Running the above test gives the below output.
data class JsonToKotlinMain (val someString: String, val someBoolean: Boolean, val someNumber: Int, val someArrayOfNumber: Array<Int>, ), data class JsonToKotlinMain (val someString: String, val someBoolean: Boolean, val someNumber: Int, val someArrayOfNumber: Array<Int>, ) data class JsonToKotlinBaseSomeObject (val someNestedNumber: Int, val someNestedString: String, ) data class JsonToKotlin2 (val someObject: JsonToKotlinBaseSomeObject, )
Note that the first object is repeated twice.
Is there any way to create stop this appending behavior?
The text was updated successfully, but these errors were encountered: