Skip to content

sebastianconcept/JSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON

JSON abstraction for Pharo Smalltalk

build

Release License

Pharo 7 Pharo 10

This is a port from older smalltalkhub.com/PharoExtras/JSON

This is a comfortable way to use Smalltalk objects that your program can eventually represent as JSON.

Example

"This is how you would use a typical dictionary:"
theUniverseAndEverything := Dictionary new
	at: #theQuestion put: 'Questioner asks';
	at: #answer put: 42;
	yourself.


"JsonObject instances are like dictionaries
that use DoesNotUnderstand to set their values:"
theUniverseAndEverything := JsonObject new
	theQuestion: 'Questioner asks';
	answer: 42;
	yourself.

"And then you can:"
theUniverseAndEverything asJSONString.
'{"answer"":42,"theQuestion":"Questioner asks"}'

Load from Playground

Metacello new
  baseline:'JSON';
  repository: 'github://sebastianconcept/JSON:latest/src';
  load.

Load as dependency

spec
  baseline: 'JSON'
  with: [ spec
    loads: #('JSON');
    repository: 'github://sebastianconcept/JSON:latest/src' ]

About

JSON port from older PharoExtras @ Smalltalkhub

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors