Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
7812952
Sync with upstream MC repositories
svenvc Jul 14, 2016
dd0c2a8
sync with upstream repo
svenvc Aug 29, 2017
fa9ae45
sync with upstream MC repo (with mariano's reorg)
svenvc Oct 1, 2018
0ff7fbe
add project info
svenvc Oct 1, 2018
ff1c227
added BaselineOfNeoJSON
svenvc Oct 1, 2018
6912f23
sources migrated
svenvc Oct 1, 2018
b52e89b
Create .smalltalk.ston
svenvc Oct 1, 2018
20ff4d7
Create .travis.yml
svenvc Oct 1, 2018
aa7ab9d
Update README.md
svenvc Oct 1, 2018
363b125
Update README.md
svenvc Oct 1, 2018
2248f98
Update README.md
svenvc Oct 1, 2018
d79d6a1
fixed bogus formatted .properties file
noha Nov 6, 2018
b10eb7a
Merge pull request #6 from zweidenker/master
svenvc Nov 6, 2018
14da762
added installation instructions
svenvc Dec 15, 2018
c368bbf
Change NeoJSONWriter to give an error when map keys/names are not str…
svenvc Feb 25, 2019
f585bec
Create CI.yml
svenvc Mar 12, 2021
d6f0344
Using new CI badge
svenvc Mar 12, 2021
cf48693
Stop using Travis CI
svenvc Mar 12, 2021
a35ab06
Add NeoJSONWriter>#floatPrinter: to set an optional float printer
svenvc May 19, 2021
29ac25e
Merge cf48693413ef1277592cf5196b2fa431d97f5fff
svenvc May 19, 2021
dd14821
Make NeoJSONFloatPrinter more configurable.
svenvc May 21, 2021
a16e02b
Link to the Pharo Enterprise book chapter
svenvc May 23, 2021
ce07be6
Rename NeoJSONFloatPrintrTests to NeoJSONFloatPrinterTests
svenvc Oct 29, 2021
dd24979
Merge a16e02b3e770cf2c6e1b15e4f2d71073535f07b5
svenvc Oct 29, 2021
109d08b
Make NeoJSONObject inherit from OrderedDictionary.
svenvc Nov 3, 2021
d0b66e7
Patch a bug in OrderedDictionary>>#at:ifPresent:ifAbsentPut: (in Phar…
svenvc Nov 10, 2021
91a79b3
Use OSPlatform current lineEnding as default for NeoJSONWriter's new …
svenvc Jan 30, 2022
c1fde71
Add Pharo 10 to CI
gcotelli Apr 6, 2022
b9c6415
Merge pull request #14 from ba-st-dependencies/pharo_10
svenvc Apr 6, 2022
5037c7a
Adds support for different species of String in NeoJSONReader streams
eMaringolo Aug 23, 2022
1a8fc3c
Merge pull request #16 from eMaringolo/species
svenvc Aug 24, 2022
2bcd1c8
Add NeoJSONMockStream>>#collectionSpecies
svenvc Aug 24, 2022
a18a783
Add Pharo 11 CI support
svenvc Nov 28, 2022
3dc8689
Add NeoJSONObject>>#at:at:[put:] overrides delegated to #atPath:put: …
svenvc May 2, 2023
e496011
Improve Float parsing accuracy following improvements made in STON (p…
svenvc Jun 20, 2023
0033dbf
Merge 3dc868944d6eb2ba65927d3018ad13d93a7c4905
svenvc Jun 20, 2023
b05162a
https://github.com/svenvc/NeoJSON/issues/20
svenvc Sep 6, 2023
a2698e3
Introduced NeoJSONArray as complement to NeoJSONObject
svenvc Oct 23, 2023
45e6304
First Lepiter page
svenvc Oct 23, 2023
d70b6df
Extend docs
svenvc Oct 24, 2023
2415f50
More example, more documentation
svenvc Oct 25, 2023
4e0d822
Remove Neo-JSON-GT package and gt group from BaselineOfNeoJSON
svenvc Nov 14, 2023
2b0c0d2
Delete repository/Neo-JSON-GT directory
svenvc Nov 14, 2023
1d81fa2
Extend NeoJSONObject/NeoJSONArray path access a bit to better allow f…
svenvc Nov 29, 2023
c09b91c
improve class side instance creation of NeoJSONObject
svenvc Mar 27, 2024
c4561ba
Update CI.yml
svenvc Apr 18, 2024
4fea257
added NeoJSON[Object|Array]>>#findPath[s]: for searching an object graph
svenvc Apr 19, 2024
19bb4ca
Merge c4561bac65ff63cf5471c03d0cd6b4f9e4e852f9
svenvc Apr 19, 2024
17efabc
adding support for Newline delimited JSON (application/x-ndjson) & JS…
svenvc Apr 24, 2024
f5652fb
Extend NeoJSON findPath code
svenvc Aug 1, 2024
31fd0a2
Added NeoJSONObject>>#removeAtPath:
svenvc Nov 15, 2024
b1ca95d
Fix NeoJSONCustomMapping>>#listOfType: to also set a default writer a…
svenvc Nov 15, 2024
f54cfb4
Make NeoJSONArray an OrderedCollection subclass so that insertion/add…
svenvc Nov 18, 2024
6670622
Added Nix flake.
rydnr Apr 15, 2025
9af34bb
Merge pull request #23 from rydnr/master
svenvc Apr 15, 2025
a09f833
Add Pharo 13 to build matrix
svenvc Sep 11, 2025
11e274d
Fix NeoJSONReaderTests>>#testFloats by increasing the pi constant's p…
svenvc Sep 11, 2025
1e3c4f8
Converting tonel -> filetree format to be loadable by GS
Sep 30, 2025
5d57e9b
Group specific names should be capitalized
Sep 30, 2025
0ea06d3
Merge branch 'master' into gs_master
Oct 1, 2025
571cc68
Removing empty files
Oct 1, 2025
29a8af2
Removing obsolete ConfigurationOf
Oct 1, 2025
fc8301f
Adjusting baseline to load all code to GemStone
Oct 1, 2025
ccd1ec9
No SmallDictionary or OrderedDictionary in GemStone
Oct 1, 2025
8e82df0
Making code more portable for other Smalltalk flavours
Oct 1, 2025
86a9190
Removing rouge filetree code from tonel repository
Oct 1, 2025
3681bb3
Code portability and index is expected to be a Symbol
Oct 1, 2025
6d09570
Refactoring tests to expose what is actually being tested
Oct 1, 2025
f4924c2
Enable converting NeoJSONArray values into a String
Oct 1, 2025
ee0a5d5
readStream message is superfluous on GemSTone
Oct 1, 2025
56d3ab5
Refactoring for code portability between different Smalltalk dialects
Oct 1, 2025
e3cf28e
Skipping platform detection
Oct 1, 2025
152f3cc
Making the code to work in both Pharo and Gemstone
Oct 2, 2025
8a77211
Making tests GemStone compatible
Oct 2, 2025
ad6142e
Symbol is not the same thing as String
Oct 2, 2025
0d02306
Adding used methods to as extensions
Oct 2, 2025
538652c
Adding special variables for NeoJSON
Oct 2, 2025
7822024
Changing the test using one from the upstream
Oct 2, 2025
9a066a8
Adding compatibility method
Oct 2, 2025
8142df4
Changing the test using one from the upstream
Oct 2, 2025
84a3307
Improving Time test compatibility
Oct 2, 2025
5992a3b
Date test takes into account the existence of SmallDate
Oct 2, 2025
7cd453c
DateAndtime test takes into account the existence of SmallDateAndTime
Oct 2, 2025
3b2755a
Defining method twice breaks the load
Oct 2, 2025
384838e
Adding missing method name
Oct 2, 2025
0db08ff
Enable running SmalltalkCI job
Oct 3, 2025
13b6403
Compensating for different IdentityDictionary inheritance in GemStone
Oct 3, 2025
37f910b
Adding extensions for NeoJSON escapeUnicode4: functionality
Oct 3, 2025
5e10821
Compensating for different String structure in GemStone
Oct 3, 2025
5ed17a8
It appears that #neoJsonOn: is not sufficient anymore
Oct 3, 2025
c945045
This tests is here by mistake
Oct 3, 2025
e2fc05c
Sending correct message
Oct 3, 2025
0707bb2
Adding CI stuff
Oct 3, 2025
0f88d34
Eliminating duplicate code
Oct 6, 2025
113d034
GemStone does not have OrderedDictionary only Dictionary
Oct 6, 2025
02f0ca2
Refactoring CI stuff
Oct 6, 2025
a09349d
Testing JSON without relying on order of objects
Oct 6, 2025
4e83575
File cleanup
Oct 7, 2025
1dd2780
Bug prevents a defalt group load
Oct 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# inform linguist that files with these extensions are indeed smalltalk files
*.st linguist-language=Smalltalk
*.gs linguist-language=Smalltalk
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build

on: [ push, pull_request, workflow_dispatch ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
smalltalk: [ Pharo64-13, Pharo64-12, Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0 ]
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- name: Set up Smalltalk CI
uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Load Image and Run Tests
run: smalltalkci -s ${{ matrix.smalltalk }} .smalltalkci/.unit-tests.ston
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 15
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
name: ${{matrix.os}}-${{matrix.smalltalk}}
token: ${{ secrets.CODECOV_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: smalltalkCI

on:
push:
pull_request:
branches:
gemstone
schedule:
- cron: "15 2 9 * *" #run job on the 9th day of every month on the 15th minute of the 2nd hour

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
smalltalk: [ GemStone64-3.7.2, GemStone64-3.7.4.3 ]
runs-on: ${{ matrix.os }}
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v2
- uses: hpi-swa/setup-smalltalkCI@v1
with:
smalltalk-image: ${{ matrix.smalltalk }}
- name: Run tests
run: smalltalkci -s ${{ matrix.smalltalk }}
shell: bash
timeout-minutes: 20
slack-workflow-status:
if: always()
name: Post Workflow Status To Slack
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
slack_webhook_url: ${{secrets.SLACK_DALEHENRICH}}
name: 'action run'
85 changes: 85 additions & 0 deletions .nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 122 additions & 0 deletions .nix/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
description = "Flake for svenvc/neojson";

inputs = rec {
flake-utils.url = "github:numtide/flake-utils/v1.0.0";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
pharo-vm-12 = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:rydnr/nix-flakes/pharo-vm-12.0.1519.2?dir=pharo-vm";
};
};
outputs = inputs:
with inputs;
flake-utils.lib.eachDefaultSystem (system:
let
org = "svenvc";
repo = "neojson";
pname = "${repo}";
tag = "v18";
baseline = "NeoJSON";
pkgs = import nixpkgs { inherit system; };
description = "An elegant and efficient Smalltalk framework to read and write JSON converting to or from Smalltalk objects";
license = pkgs.lib.licenses.mit;
homepage = "https://github.com/svenvc/neojson";
maintainers = with pkgs.lib.maintainers; [ ];
nixpkgsVersion = builtins.readFile "${nixpkgs}/.version";
nixpkgsRelease =
builtins.replaceStrings [ "\n" ] [ "" ] "nixpkgs-${nixpkgsVersion}";
shared = import ./shared.nix;
svenvc-neojson-for = { bootstrap-image-name, bootstrap-image-sha256, bootstrap-image-url, pharo-vm }:
let
bootstrap-image = pkgs.fetchurl {
url = bootstrap-image-url;
sha256 = bootstrap-image-sha256;
};
src = ./../repository;
in pkgs.stdenv.mkDerivation (finalAttrs: {
version = tag;
inherit pname src;

strictDeps = true;

buildInputs = with pkgs; [
];

nativeBuildInputs = with pkgs; [
pharo-vm
pkgs.unzip
];

unpackPhase = ''
unzip -o ${bootstrap-image} -d image
# cp -r ${src} src
'';

configurePhase = ''
runHook preConfigure

# load baseline
${pharo-vm}/bin/pharo image/${bootstrap-image-name} eval --save "EpMonitor current disable. NonInteractiveTranscript stdout install. [ Metacello new repository: 'filetree://${src}'; baseline: '${baseline}'; onConflictUseLoaded; load ] ensure: [ EpMonitor current enable ]"

runHook postConfigure
'';

buildPhase = ''
runHook preBuild

# assemble
${pharo-vm}/bin/pharo image/${bootstrap-image-name} save "${pname}"

mkdir dist
mv image/${pname}.* dist/

runHook postBuild
'';

installPhase = ''
runHook preInstall

mkdir -p $out
cp -r ${pharo-vm}/bin $out
cp -r ${pharo-vm}/lib $out
cp -r dist/* $out/
cp image/*.sources $out/
mkdir $out/share
pushd ${src}
${pkgs.zip}/bin/zip -r $out/share/src.zip .
popd

runHook postInstall
'';

meta = {
longDescription = ''
NeoJSON is an elegant and efficient standalone Smalltalk framework to read and write JSON converting to or from Smalltalk objects.
'';
inherit description homepage license maintainers;
mainProgram = "pharo";
platforms = pkgs.lib.platforms.linux;
};
});
in rec {
defaultPackage = packages.default;
devShells = rec {
default = svenvc-neojson-12;
svenvc-neojson-12 = shared.devShell-for {
package = packages.svenvc-neojson-12;
inherit org pkgs repo tag;
nixpkgs-release = nixpkgsRelease;
};
};
packages = rec {
default = svenvc-neojson-12;
svenvc-neojson-12 = svenvc-neojson-for rec {
bootstrap-image-url = pharo-vm-12.resources.${system}.bootstrap-image-url;
bootstrap-image-sha256 = pharo-vm-12.resources.${system}.bootstrap-image-sha256;
bootstrap-image-name = pharo-vm-12.resources.${system}.bootstrap-image-name;
pharo-vm = pharo-vm-12.packages.${system}.pharo-vm;
};
};
});
}
35 changes: 35 additions & 0 deletions .nix/shared.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# .nix/shared.nix
#
# This file provides functions used by NeoJSON's Nix flake.
#
# MIT License
#
# Copyright (C) 2012 Sven Van Caekenberghe
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
rec {
shellHook-for = { nixpkgs-release, org, package, repo, tag }:
''
export PS1="\033[37m[\[\033[01;34m\]${org}/${repo}\033[01;37m|\033[01;33m${tag}[\033[00m\] "
echo -e "\033[36m▗▖  ▗▖▗▞▀▚▖ ▄▄▄ \033[31m ▗▖ ▗▄▄▖ ▗▄▖ ▗▖  ▗▖ \033[32mhttps://github.com/${org}\033[0m"
echo -e "\033[36m▐▛▚▖▐▌▐▛▀▀▘█   █\033[31m ▐▌▐▌   ▐▌ ▐▌▐▛▚▖▐▌ \033[33mhttps://github.com/${org}/${repo}:${tag}\033[0m"
echo -e "\033[36m▐▌ ▝▜▌▝▚▄▄▖▀▄▄▄▀\033[31m ▐▌ ▝▀▚▖▐▌ ▐▌▐▌ ▝▜▌ \033[34mhttps://pharo.org\033[0m"
echo -e "\033[36m▐▌  ▐▌ \033[0m       \033[31m▗▄▄▞▘▗▄▄▞▘▝▚▄▞▘▐▌  ▐▌ \033[35mhttps://github.com/nixos/nixpkgs/tree/${nixpkgs-release}\033[0m"
echo
echo -e "Thank you for using \033[32m${package.pname}\033[0m \033[33m${package.version}\033[0m \033[31m(${org}/${repo}-${tag})\033[0m and for your appreciation of Smalltalk."
'';
devShell-for = { nixpkgs-release, org, package, pkgs, repo, tag}:
pkgs.mkShell {
shellHook = shellHook-for {
inherit nixpkgs-release org package repo tag;
};
};
app-for = { package, entrypoint }: {
type = "app";
program = "${package}/bin/${entrypoint}.sh";
};
}
3 changes: 3 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
'srcDirectory' : 'repository'
}
10 changes: 10 additions & 0 deletions .smalltalk.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'NeoJSON',
#directory : 'filetree',
#load : [ 'Core', 'Tests' ],
#platforms : [ #gemstone ]
}
]
}
10 changes: 10 additions & 0 deletions .smalltalk_gemstone.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'NeoJSON',
#directory : 'filetree',
#load : [ 'Core', 'Tests' ],
#platforms : [ #gemstone ]
}
]
}
9 changes: 9 additions & 0 deletions .smalltalk_pharo.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'NeoJSON',
#directory : 'repository',
#platforms : [ #pharo ]
}
]
}
16 changes: 16 additions & 0 deletions .smalltalkci/.unit-tests.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SmalltalkCISpec {
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'NeoJSON',
#directory : '../repository',
#load : [ 'build' ],
#platforms : [ #pharo ]
}
],
#testing : {
#coverage : {
#packages : [ 'Neo-JSON*' ],
#format: #lcov
}
}
}
Loading
Loading