intersystems / intersystems/ipm

Use JSON instead of multidimensional array in `AddIPMMappedNamespaces`

Open
#580 0 comments 0 reactions 1 assignee Claimed by @isc-shuliu View on GitHub
enhancement
Dominant language
ObjectScript
Stars
41
Forks
29
Avg merge
23h 54m
Merged PRs (30d)
4

Description

> This seems like a good use of a JSON object instead of a subscripted array. Seems overly complex and harder to follow the logic with the subscripted array.
My general rule of thumb is to use a subscripted array mostly when I need de-duplication so like a set.
For a dynamic object, can look like the following (also document why ns and width are needed):
```
{
ns: "*",
width: 4,
namespaces: {
"USER": [
"zpm": { "version": "0.9.0-SNAPSHOT", description: "Package Management System", devMode: 1 },
"zpm-registy": { "version": "1.3.2", description: "ZPM Registry", devMode: 0 }
]
}
```

_Originally posted by @isc-kiyer in https://github.com/intersystems/ipm/pull/485#discussion_r1779017660_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.