[squeak-dev] Json dictionary tree accessing

Tobias Pape Das.Linux at gmx.de
Thu Sep 2 10:37:25 UTC 2021


Hi Levente


> On 2. Sep 2021, at 12:01, Levente Uzonyi <leves at caesar.elte.hu> wrote:
> 


> Starting from Json-ul.48, you don't need those #yourself sends when constructing json objects, so you can save those and the barchart variable as well:

nice, I actually just copy-replaced in tim's code, but that one is actually even more concise.

> 
> 	^JsonObject new
> 		at: '$schema' put: 'https://vega.github.io/schema/vega-lite/v5.json';
> 		description: 'A simple bar chart';
> 		width: 'container';
> 		usermeta: (JsonObject new
> 			embedOptions: (JsonObject new
> 				export: true;
> 				compiled: false;
> 				editor: false));
> 		mark: (JsonObject new
> 			type: #bar;
> 			tooltip: true);
> 		encoding: (JsonObject new
> 			x: (JsonObject new
> 					field: 'label';
> 					type: #nominal;
> 					axis: (JsonObject new
> 						labelAngle: -45);
> 					title: #Group);
> 			y: (JsonObject new
> 					field: 'value';
> 					type: #quantitative;
> 					title: #Value));
> 		height: 'container'
> 
> 
> Levente

Best regards
	-Tobias


More information about the Squeak-dev mailing list