Coder Social home page Coder Social logo

Comments (4)

gregsdennis avatar gregsdennis commented on June 11, 2024

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.

wszwc avatar wszwc commented on June 11, 2024

您是否考虑添加对 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.

gregsdennis avatar gregsdennis commented on June 11, 2024

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.

wszwc avatar wszwc commented on June 11, 2024

关于 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.