Oh... didn't realize this was already in. :)

I assume the file is looked for in the same directory as the including file ?

Can you also specify absolute file paths ? (<?include "/var/data/file.json"?>)
And relative paths ? (<?include "./subnets/foo.json"?>)


-----Message d'origine-----
De : Francis Dupont [mailto:[email protected]] 
Envoyé : vendredi 1 septembre 2017 13:40
À : Chaigneau, Nicolas
Cc : Marcin Siodelski; Kea Users List
Objet : Re: [Kea-users] Shared subnets configuration - input needed

"Chaigneau, Nicolas" writes:
> But it would be even better if we had an "include" directive. I think 
> it has already been suggested, maybe it's time to add this.

=> we already have a lexical (*) include as an extension to JSON,
e.g.: <?include "/foo/bar" ?>
(PS: lexical as it is handled by flex generated code, for instance you can 
include unbalanced JSON parts when CPP is syntactic).

Regards

Francis Dupont <[email protected]>

PS: this feature was added for exactly this use case. It supports recursive 
includes and raises a fatal error when the include stack depth is greater than 
10 (i.e. when it loops).
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient, you are not authorized 
to read, print, retain, copy, disseminate, distribute, or use this message or 
any part thereof. If you receive this message in error, please notify the 
sender immediately and delete all copies of this message.

_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to