Replies: 3 comments 2 replies
-
我认为应该支持泛型
|
Beta Was this translation helpful? Give feedback.
-
是否能支持 枚举类型? |
Beta Was this translation helpful? Give feedback.
-
I think it is necessary to support 'any' type. I have a task where I provide json logs of smart devices to the front-end. And the data reported by it is completely different at different time, so it cannot be formatted as a unified map result. I have to keep the json form of request results for the front-end to use, rather than strings. So using 'any' is probably the best solution. Such as the following two forms of data: {"msg": {"A": 1,"B":2,"C":"result"}} {"msg": {"B":1,"D":"result2"}} Data content richness is determined by the type of business, and the framework should provide more adequate ways to support it, rather than increasing the burden of serialization and deserialization for the sake of "specification". 我认为支持泛型 如下面两种数据形式: {"msg": {"A": 1,"B":2,"C":"result"}} {"msg": {"B":1,"D":"result2"}} 数据内容丰富性是业务类型决定的,框架应该提供更足够的支持方式,而非为了「规范」让开发增加序列化、反序列化的负担。 |
Beta Was this translation helpful? Give feedback.
-
In the API description language, considering that all request and response data should be concrete data and types, that is, each field should be strongly typed, so there is no support for generics and any types, do you think it is reasonable? What do you think?
Beta Was this translation helpful? Give feedback.
All reactions