latest/cls/pkg/isc/json/: Core IRIS ObjectScript sources (adaptor, mapping, utils).latest/internal/testing/unit_tests/UnitTest/isc/json/: Unit tests using%UnitTest.TestCase.latest/docs/andlatest/README.md: User docs and notes.latest/module.xml: ZPM module manifest for packaging/testing.
- Perforce is used instead of git.
- If a file is not checked out in perforce, run p4 edit or p4 add as needed before making edits
- Compile sources (from IRIS terminal in the correct namespace):
zpm "install isc.json"
- Run tests via ZPM (prompt for instance and namespace):
- Prefer this interactive shell snippet so you can choose the IRIS instance and namespace at run time:
read -r -p "IRIS instance name: " IRISINST read -r -p "Namespace to run tests: " NS iris session "$IRISINST" -U "$NS" <<'EOF'
- Prefer this interactive shell snippet so you can choose the IRIS instance and namespace at run time:
_system SYS zpm "isc.json test" halt EOF ```
- To run a single test case, replace the
zpmline with, for example:zpm "isc.json test -only -DUnitTest.Case=UnitTest.isc.json.exportArray" - If already inside an IRIS terminal in your target namespace, you can simply run:
zpm "isc.json test"
- One class per
.clsfile; keep class path aligned with package. - Methods (including tests): PascalCase; avoid underscores.
- Indentation: 4 spaces or tabs consistently; align
Try/Catch/Whileblocks. - Use
///for concise class/method docs; prefer code examples over prose. - Methods should throw errors instead of returning %Status unless overriding a method that requires returning %Status.
- Place tests under
latest/internal/testing/unit_tests/UnitTest/isc/jsoninUnitTest.isc.json.*packages. - Name test methods
Test...and keep assertions focused and readable. - Keep tests hermetic: no external I/O or network; use
%DynamicObject/%DynamicArrayfixtures. - Run tests locally before pushing; ensure new tests pass and do not break existing ones.
- Do not include real data/PII in fixtures.
- Prefer configuration via parameters over hardcoding environment paths.
- Validate JSON with
%DynamicAbstractObjectAPIs; avoid unsafe string parsing.