[squeak-dev] I'd like to contribute to the JSON project

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Sep 5 20:08:05 UTC 2020


Here is a second small but, as I hope, useful patch.


Name: JSON-ct.41
Author: ct
Time: 5 September 2020, 10:04:48.328336 pm
UUID: 15667ebd-25e5-2f45-a758-7ab8df09a3e1
Ancestors: JSON-ct.40

Implements #respondsTo: on JsonObject.

Usage:
| anObject |
anObject := Json readFrom: '{"foo": 42}' readStream.
(anObject respondsTo: #foo)
ifTrue: [anObject foo]
ifFalse: ["fallback code"].

This is especially helpful when using JsonObjects anywhere in the system as polymorphic substitution for other classes.

Have a nice weekend!
Best,
Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Thiede, Christoph
Gesendet: Samstag, 5. September 2020 21:59 Uhr
An: Squeak Dev; Tony Garnock-Jones; Niephaus, Fabio
Betreff: [squeak-dev] I'd like to contribute to the JSON project


Hi all,


I'd like to contribute to the JSON project, but apparently I lack the required access rights. Would it be possible to review this patch, which adds UTF-16 support for JSON strings, with the final goal to introduce it into the repository? :-)


Name: JSON-ct.40
Author: ct
Time: 5 September 2020, 9:48:49.742336 pm
UUID: 85bcdb2a-a65e-b14f-90a6-eb6ad8f82eba
Ancestors: JSON-tonyg.39

Adds support and tests for UTF16 unicode strings.

Unicode sequences should not be parsed as two separate characters but rather as a single one with 4 bytes. For more information, see https://tools.ietf.org/id/draft-ietf-json-rfc4627bis-09.html#rfc.section.7.


Best,

Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200905/93836668/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JSON-ct.41.mcz
Type: application/octet-stream
Size: 16615 bytes
Desc: JSON-ct.41.mcz
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200905/93836668/attachment.obj>


More information about the Squeak-dev mailing list