Referencing another file

Another question from me!

As part of our project, the layout will often change so I want the layout part of the json file to reference another file containing it’s info.

I have a file called layout doc.json, in the same directory. Within it:

{

“typename”: “matrix”,

“brightness”: 128,

“width”: 12,

“height”: 6,

“gen_coord_map”: [ALLSORTS]

}

From in the main file, how do I reference this? I’ve tried

“layout”: {

“typename”: { “$ref”: “layout doc.json” },

((repeated for other attributes))

},

What am I missing??

Tom,

Still having issues with this. Also some of the links you posted before 404 on me :frowning:

“layout”: “layoutdoc.json” in the main file gets me Cannot import symbol ‘layoutdoc.json’

and

“layout”: { “$ref”: “layoutdoc.json” } gets me construct_child() missing 1 required positional argument: ‘datatype’

What am I missing?

Adam2

···

On Thursday, March 1, 2018 at 9:24:59 PM UTC, Adam Davies wrote:

Another question from me!

As part of our project, the layout will often change so I want the layout part of the json file to reference another file containing it’s info.

I have a file called layout doc.json, in the same directory. Within it:

{

“typename”: “matrix”,

“brightness”: 128,

“width”: 12,

“height”: 6,

“gen_coord_map”: [ALLSORTS]

}

From in the main file, how do I reference this? I’ve tried

“layout”: {

“typename”: { “$ref”: “layout doc.json” },

((repeated for other attributes))

},

What am I missing??