DB API Demo 1

Transformations on Expressions

Load Packages

ClearAll["Global`*"]

(*PrependTo[$Path,FileNameJoin[{$HomeDirectory,"WolframWorkspaces/Base/DBapiprj"}]];*)

<<"DBAPI`"

Shortened Package Commands

e2j=DBexpressionToJSON;
e2jc=DBexpressionToJSON[#,compact->True]&;

List of Rules

List of Rules : Construction

lisR={
"json1"->Thread[{"x","y","z"}->{"a","b",3.9}],
"json2"->{"alpha",3,"beta", 2},
"price"->5.3945,
"title"->"This is a title"
};

List of Rules : Representations

TableForm

lisR//TableForm

Dataset

lisR//Association//Dataset

lisR//ToAssociations//Dataset

JSON

Pretty-Printing

lisR//e2j

Compact Form

lisR//e2jc