[英]how to define the values in json schema?
I have created the jsonform using jsonschema. 我使用jsonschema创建了jsonform。 But i need to define the external values in schema.
但我需要在架构中定义外部值。 for ex : to define the first name value externally.
例如:在外部定义名字值。 I tried with $ref to define external json but still it not works.
我尝试使用$ ref来定义外部json,但它仍然不起作用。 In my local json values are : [{ "male": "blah blah", "female": "woof woof" }]
在我当地的json值是:[{“male”:“blah blah”,“female”:“woof woof”}]
I inject the json values in to the below schema 我将json值注入以下模式
"value": { "$ref": "data3.json"} “value”:{“$ ref”:“data3.json”}
can anyone please let me know the solution? 任何人都可以让我知道解决方案吗?
Try this 尝试这个
$var1='{ "male": "boy", "female": "girl" }'; $ var1 ='{“male”:“boy”,“female”:“girl”}';
test it like this 像这样测试它
echo $var1; echo $ var1;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.