Comments (9)
Could I work on this?
from devtoys.
Exactly. I see this as a input window for my C# class and (maybe) a JSON constructor where I can pick values I need in my JSON.
I mentioned that because I often test my APIs by Postman and I always struggle with converting my API's input model into JSON especially a large ones.
That initial conversion can be done by Swagger, but Swagger generates model as full as it can be, so I have to manually clean it and that can be very time consuming
from devtoys.
With pleasure!
Some guidance:
- Feel free to make your own solution for the conversion, or take example on existing implementation on GitHub. Just be mindful of the license. I'd like to keep DevToys under MIT license, so I'd avoid anything that has a license requiring us to publish DevToys under the same than their.
- Keep things simple, for now. I'd prefer shipping a converter with a minimal set of languages and options for it than delivering a lot options right at the beginning. For example, for C#, I think the following options to start should be enough:
- Should array be treated as [] or List
- Should properties support nullable values or not
- Follow the coding style guidance here: https://github.com/veler/DevToys/blob/main/CONTRIBUTING.md#coding
- Let's start with JSON to C# and TypeScript first. Let's see in a future iteration for other languages like Java, Python or C++
- Let's support Smart Detection feature. Here is an example: https://github.com/veler/DevToys/blob/d6cf9414110d9fecf4c2c44af8df74074ea1def4/src/dev/impl/DevToys/ViewModels/Tools/JsonFormatter/JsonFormatterToolProvider.cs#L29-L32
- When designing the UI
- Consider using the monaco editor like in Json Formatter or Json <> Yaml tool.
- If you need more than 3 options in the UI, consider an expandable one, like in Regex Tester tool
- Make sure to test the UI in compact mode, maximized window and small (width and height) window side.
Don't hesitate to ask questions here or ping me on Discord :)
Thank you so much for wanting to participate :D
from devtoys.
Visual Studio already has an option for this under the Edit menu.
from devtoys.
@JaiganeshKumaran , thank you :)
What you're saying is true, but it lacks a few options to define, for example, whether we want PascalCase, camelCase, and more options that we can find on websites online.
We're trying to bring the power of these online service into an offline app, not to limit ourselves to what Visual Studio already does.
from devtoys.
Hi guys! Is there any chance to see Class to JSON converter? I'd love to use it for API testing
from devtoys.
By Class to Json, to you mean generating mocked JSON value from a class definition?
from devtoys.
I kinda implemented it with NJsonSchema on a sample console app but the output is messy, still have to port it to the app.
from devtoys.
[December 2022 update]
This could be a potential paid feature for DevToys 2.0.
UX could be as simple as:
Input:
JSON
Output:
TypeScript, Python, Java, C#, PHP, C++, Ruby, Go, Dart, Rust, Swift
Settings:
They would be specific to each output language selected. For example, for C#, we could allow to chose whether a [JSONProperty] attribute should be added.
from devtoys.
Related Issues (20)
- JSON Formatter: move settings to the side and give more space to the formatter HOT 3
- hexadecimal decode\encode HOT 1
- 时间戳支持毫秒、微秒、纳秒 HOT 1
- AVRO Schema from JSON & JOLT Transform HOT 1
- Prevent freeze when starting the program HOT 4
- Portable Version needed HOT 1
- Unable to compress JPG - PNG working HOT 1
- curl to python requests code HOT 1
- load error:DevToys.Api.GUI.MultilineTextInput HOT 2
- Build failure due to Generators HOT 2
- Crash when opening Base64 Text Encoder HOT 1
- JSON To YAML Convert should preserve unicode escape HOT 1
- Missing letter in PasswordGenerator's UppercaseDescription HOT 1
- Token counter for generative AI
- Add Key/IV generators for AES etc.
- 点击base64文本按钮后,程序崩溃了。
- Chmod! HOT 7
- 希望添加 join 和 反向 join 字符串的函数
- Spanish translation issue HOT 7
- No tool displayed 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 devtoys.