Skip to content

Commit e6a02bd

Browse files
committed
Finish v1.2
1 parent d949063 commit e6a02bd

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ writing JSON objects
66
Copyright © 2014-25 Michael Scott Asato Cuthbert.
77
Released under the BSD (3-clause) license. See LICENSE.
88

9-
# Pre-class-based system
9+
# Pre-class-based system (Closing down)
1010

1111
Note for 2025+: This system depends on legacy style functions that behave like objects.
1212
To use with modern Javascript you will need to assign all classes to globalThis (window, global).
13+
For this reason, v1.2 will be the last version of jsonpickleJS. Using custom decoders in JSON.parse
14+
is probably the best solution going forward in the modern world.
1315

1416
# Python to Javascript and Back
1517
Python has a remarkable number of ways (for a language that believes there's only one way to do it)
@@ -34,8 +36,8 @@ namespace, such as ``window``, in the Javascript. For instance, if you have a c
3436
``window.myobject.Thing`` in Javascript. The object, and any subobjects, will be created as closely
3537
as possible in Javascript.
3638

37-
The reverse is also possible, with some caveats. Since Javascript doesn't (until ECMAScript 6) have
38-
the concept of named classes, each object will need to have a marker somewhere on it saying what
39+
The reverse is also possible, with some caveats. Since Javascript didn't (until ECMAScript 6) have
40+
the concept of named classes, each object needed to have a marker somewhere on it saying what
3941
Python object it should convert back to. The marker is
4042
``o[jsonpickle.tags.PY_CLASS] = 'fully.qualified.ClassName'``.
4143
It may be possible in the future to use ``instanceof``

tests/testPickle.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ <h1>jsonpickleJS Test</h1>
3232

3333
const original = jsonpickle.decode(encodeOutput);
3434
console.log('Decoded:', original);
35-
// appears that there is a ref counting bug here.
35+
// appears that there is a ref counting bug in the subList which
36+
// existed even in v.1.1 and before.
3637
</script>
3738
</body>
3839
</html>

0 commit comments

Comments
 (0)