Comments (4)
Have you considered adding support for the JToken type?
Like, from Newtonsoft.Json? No. These libraries are built on System.Text.Json which is built into .Net.
When I tried to use schema.GenerateData() to generate a data template, an error occurred that the custom metastructure could not be parsed. Can I ignore the parts that cannot be parsed through configuration?
I'll need you to open a new bug issue for this. Please select "JsonSchema.Net.DataGeneration" as the library and provide reproduction steps.
How do I convert a JsonSchema into a JsonNode object
Serialize it. Please see the documentation. (Hint)
from json-everything.
您是否考虑添加对 JToken 类型的支持?
也就是说,来自_Newtonsoft.Json_?不会。这些库基于_System.Text.Json_构建,而System.Text.Json内置于.Net中。
当我尝试使用 schema.GenerateData() 生成数据模板时,出现无法解析自定义元结构的错误。无法通过配置解析的部分可以忽略吗?
我需要您打开一个新的错误问题。请选择“JsonSchema.Net.DataGeneration”作为库并提供替换步骤。
如何将 JsonSchema 转换为 JsonNode 对象
将其序列化。请参见文档。(暗示)
About schema.GenerateData()
This is my JsonSchema file
https://github.com/wszwc/ProductContentJson/blob/main/test.json
Sorry I didn't express myself clearly, I want to convert the JsonSchema type object from the Json.Schema namespace into a JsonNode
from json-everything.
About schema.GenerateData()
This is my JsonSchema file
https://github.com/wszwc/ProductContentJson/blob/main/test.json
That schema file has over 6700 lines! I'm not going to debug that. I need you to find a smaller example that replicates the issue.
I'll also need the exact error message.
Again, please file a bug issue.
I want to convert the JsonSchema type object from the Json.Schema namespace into a JsonNode
You expressed yourself clearly. You need to serialize it to do that. The link I posted is the method you need to use.
var node = JsonSerializer.SerializeToNode(schema);
from json-everything.
关于 schema.GenerateData()
这是我的 JsonSchema 文件
https://github.com/wszwc/ProductContentJson/blob/main/test.json该模式文件有超过 6700 行!我不会对此进行调试。我需要你找到一个更小的例子来复制这个问题。
我想将 JsonSchema 类型对象从 Json.Schema 命名空间转换为 JsonNode
你清楚地表达了自己的意思。您需要将其序列化才能做到这一点。我发布的链接是您需要使用的方法。
var node = JsonSerializer.SerializeToNode(schema);
Sorry for the trouble, I can't provide a smaller example, the data comes from an API.
Thank you for your answer. I will try to generate a simple template manually.
from json-everything.
Related Issues (20)
- Possibly wrong return type HOT 10
- Customizing the `format` generated for a field (without attributes) HOT 5
- Json.Schema.KeywordExtensions is not thread safe with custom keywords HOT 1
- Update Nuget package meta-data HOT 6
- Error "unknown context value" Raised After Checking for Existence HOT 2
- Online schema validator: Is successful validation of illegal json just a quirk or intentional HOT 5
- System.MissingMethodException for IReadOnlyCollection<JsonNode> after updating from JsonSchema.Net.Generation 4.3.0 to 4.3.0.2 HOT 5
- Can't get DiscriminatorKeyword working HOT 2
- Schema Evaluation fails with "Cannot resolve schema at {uri}" HOT 5
- Could not load file or assembly 'JsonPointer.Net, Version=5.0.0.0, Culture=neutral, PublicKeyToken=17ed63f672b0e278'. The system cannot find the file specified. HOT 10
- IndexOutOfRangeException occurred when evaluating schema with parallel execution. HOT 1
- jsonnet as sister of json-e HOT 3
- Escaping single quote in json path string HOT 8
- Extract data annotation attributes from JsonSchema.Net.Generation into separate project HOT 2
- Is there a way to do JSON validation that does case insensitive matching on property names? HOT 8
- Support language packs in schema playground
- sileo-featured.json
- How to export or save JsonSchema to plaintext? HOT 4
- How to write a JsonSchemaBuilder for a class that has a property of a class? HOT 4
- Schema generation doesn't work on site HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-everything.