查找

Article
· Jan 24, 2022 1m read

GlobalToJSON-Compact

I have created a package that offers a utility to load a Global into JSON object and reverse     
to create a Global from this type of JSON object. Compact refers to the structure created.
Globals nodes are included with data for a fast data load.   
But also the related code is quite compact.

The export of this Global 

Generates a JSON object that covers all Global nodes 

USER>write $$Do^ZPretty(json)
{
  "gbl":[
    "^dc.MultiD=5",
    "^dc.MultiD(1)=$lb(\"Braam,Ted Q.\",51353)",
    "^dc.MultiD(1,\"mJSON\")=\"{}\"",
    "^dc.MultiD(2)=$lb(\"Klingman,Uma C.\",62459)",
    "^dc.MultiD(2,2,\"Multi\",\"a\")=1",
    "^dc.MultiD(2,2,\"Multi\",\"rob\",1)=\"rcc\"",
    "^dc.MultiD(2,2,\"Multi\",\"rob\",2)=2222",
    "^dc.MultiD(2,\"Multi\",\"a\")=1",
    "^dc.MultiD(2,\"Multi\",\"rob\",1)=\"rcc\"",
    "^dc.MultiD(2,\"Multi\",\"rob\",2)=2222",
    "^dc.MultiD(2,\"mJSON\")=\"{\"\"A\"\":\"\"ahahah\"\",\"\"Rob\"\":\"\"VIP\"\",\"\"Rob2\"\":1111,\"\"Rob3\"\":true}\"",
    "^dc.MultiD(3)=$lb(\"Goldman,Kenny H.\",45831)",
    "^dc.MultiD(3,\"mJSON\")=\"{}\"",
    "^dc.MultiD(4)=$lb(\"\",\"\")",
    "^dc.MultiD(4,\"mJSON\")=\"{\"\"rcc\"\":122}\"",
    "^dc.MultiD(5)=$lb(\"\",\"\")",
    "^dc.MultiD(5,\"mJSON\")=\"{}\""
  ]
}
USER>

And the related Loader creates exactly the same Global

Online Demo Terminal
Online Demo SMP

Video

GitHub

3 Comments
Discussion (3)1
Log in or sign up to continue
Article
· Jan 24, 2022 2m read

GlobalToJSON-Efficient

I have created a package that offers a utility to load a Global into JSON object and reverse     
to create a Global from this type of JSON object. Efficient refers to the structure created.
Only Globals nodes containing data are presented in the generated JSON object.

The export of this Global 

Generates a JSON object that covers all Global nodes 

USER>write $$Do^ZPretty(json)
{
  "gbl":[
    {
      "node":"^dc.MultiD",
      "val":"5"
    },
    {
      "node":"^dc.MultiD(1)",
      "val":"$lb(\"Braam,Ted Q.\",51353)"
    },
    {
      "node":"^dc.MultiD(1,\"mJSON\")",
      "val":"{}"
    },
    {
      "node":"^dc.MultiD(2)",
      "val":"$lb(\"Klingman,Uma C.\",62459)"
    },
    {
      "node":"^dc.MultiD(2,2,\"Multi\",\"a\")",
      "val":"1"
    },
    {
      "node":"^dc.MultiD(2,2,\"Multi\",\"rob\",1)",
      "val":"rcc"
    },
    {
      "node":"^dc.MultiD(2,2,\"Multi\",\"rob\",2)",
      "val":"2222"
    },
    {
      "node":"^dc.MultiD(2,\"Multi\",\"a\")",
      "val":"1"
    },
    {
      "node":"^dc.MultiD(2,\"Multi\",\"rob\",1)",
      "val":"rcc"
    },
    {
      "node":"^dc.MultiD(2,\"Multi\",\"rob\",2)",
      "val":"2222"
    },
    {
      "node":"^dc.MultiD(2,\"mJSON\")",
      "val":"{\"A\":\"ahahah\",\"Rob\":\"VIP\",\"Rob2\":1111,\"Rob3\":true}"
    },
    {
      "node":"^dc.MultiD(3)",
      "val":"$lb(\"Goldman,Kenny H.\",45831)"
    },
    {
      "node":"^dc.MultiD(3,\"mJSON\")",
      "val":"{}"
    },
    {
      "node":"^dc.MultiD(4)",
      "val":"$lb(\"\",\"\")"
    },
    {
      "node":"^dc.MultiD(4,\"mJSON\")",
      "val":"{\"rcc\":122}"
    },
    {
      "node":"^dc.MultiD(5)",
      "val":"$lb(\"\",\"\")"
    },
    {
      "node":"^dc.MultiD(5,\"mJSON\")",
      "val":"{}"
    }
  ]
}
USER>


And the related Loader creates exactly the same Global

Online Demo Terminal
Online Demo SMP

Video

GitHub

2 Comments
Discussion (2)1
Log in or sign up to continue
Article
· Jan 24, 2022 1m read

GlobalToJSON-Academic

I have created a package that offers a utility to load a Global into JSON object and reverse     
to create a Global from this type of JSON object. Academic refers to the structure created.
Each logical node of the Global is presented separately with all its descendants.
Even if they don't contain any stored data.

The export of this Global 

Generates a JSON object that covers all Global nodes 

And the related Loader creates exactly the same Global

Online Demo Terminal
Online Demo SMP

Video

GitHub

1 Comment
Discussion (1)1
Log in or sign up to continue
Announcement
· Jan 19, 2022

[Video] IKO: The InterSystems Kubernetes Operator (Version 3.0)

Hey Developers,

Watch as the presenter uses IKO to deploy the WebGateway, SAM, and InterSystems API Manager with the latest version of the InterSystems Kubernetes Operator: 

⏯ IKO: The InterSystems Kubernetes Operator (Version 3.0)


🗣 Presenter: @Steve Lubars, Software Developer, InterSystems

Subscribe to the InterSystems Developers YouTube channel and stay tuned!

Discussion (0)0
Log in or sign up to continue
Question
· Jan 17, 2022

IRIS supports SMB protocol for remote folders?

Intersystems IRIS supports SMB protocol to connect and read files from remote folders (//foldername)?

7 Comments
Discussion (7)2
Log in or sign up to continue