Skip to content

Commit

Permalink
fix JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Nov 26, 2012
1 parent a1dacd9 commit e448913
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
33 changes: 0 additions & 33 deletions js/js.libraries/src/core/json.kt

This file was deleted.

31 changes: 31 additions & 0 deletions js/js.libraries/src/json.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package js

public native class Json() {
public fun <T> get(propertyName: String): T = noImpl
public fun set(propertyName: String, value: Any?): Unit = noImpl
}

//library("jsonFromTuples")
//public fun json(vararg pairs: Pair<String, Any?>): Json = js.noImpl

//library("jsonFromTuples")
//public fun json2(pairs: Array<Pair<String, Any?>>): Json = js.noImpl

library("jsonAddProperties")
public fun Json.add(other: Json): Json = noImpl

public native class JSON {
public native class object {
public fun stringify(o: Any?): String = noImpl

public fun stringify(o: Any?, replacer: ((key: String, value: Any?)->Unit)?, space: Int? = null): String = noImpl

public fun stringify(o: Any?, replacer: ((key: String, value: Any?)->Unit)?, space: String? = null): String = noImpl

public fun stringify(o: Any?, replacer: Array<String>?, space: Int?): String = noImpl

public fun stringify(o: Any?, replacer: Array<String>?, space: String? = null): String = noImpl

public fun parse<T>(text: String, reviver: ((key: String, value: Any?)->Unit)? = null): T = noImpl
}
}

0 comments on commit e448913

Please sign in to comment.