Skip to content

Commit 707ad72

Browse files
committed
removed jsimplicits
1 parent 08f94c0 commit 707ad72

File tree

2 files changed

+9
-31
lines changed

2 files changed

+9
-31
lines changed

js/src/main/scala/json/JSImplicits.scala

Lines changed: 0 additions & 29 deletions
This file was deleted.

js/src/main/scala/json/shadow/VMContext.scala

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package json.shadow
1818

1919
import json.internal.BaseVMContext
20-
import json.{ JSJValue, JValue }
20+
import json.{JSONAccessorProducer, JSJValue, JValue}
2121
import scalajs.js.{JSON => NativeJSON}
2222
import scala.scalajs.js.annotation.JSExport
2323
import scalajs.js
@@ -34,7 +34,14 @@ object VMContext extends BaseVMContext {
3434

3535
def fromAny(value: Any): JValue = JSJValue.from(value)
3636

37-
trait JValueCompanionBase
37+
trait JValueCompanionBase {
38+
implicit case object JsAnyAccessor extends JSONAccessorProducer[js.Any, JValue] {
39+
val clazz = classOf[JValue]
40+
41+
def createJSON(obj: js.Any): JValue = JValue from obj
42+
def fromJSON(jValue: JValue): js.Any = JSJValue toJS jValue
43+
}
44+
}
3845

3946
trait JValueBase { _: JValue =>
4047
//this adds JSON.stringify support

0 commit comments

Comments
 (0)