简体   繁体   English

如何从json文件生成类图或UML

[英]How to generate a class diagram or UML from a json file

I exported a json file from my firebase but I can't seem to find a tool that can generate a class diagram or UML from a json file. 我从Firebase导出了一个json文件,但似乎找不到能从json文件生成类图或UML的工具。 Can anyone help me? 谁能帮我? It'll be a great help. 这将是一个很大的帮助。

I don't think this is possible. 我认为这是不可能的。

An instance of a JSON document describes what values are attached to what key's. JSON文档的实例描述了将哪些值附加到哪些键上。 UML class diagram is meant to show structure. UML类图旨在显示结构。 A UML diagram could use a class to represent a JSON object. UML图可以使用一个类来表示JSON对象。 Using the JSON keys as attributes (with nested information as a class that it has an instance of). 将JSON键用作属性(将嵌套信息作为它具有其实例的类)。 However Going this way would still make it impossible to define the type of the information the attribute holds. 但是,以这种方式仍将无法定义属性所包含的信息的类型。 For example you might have a key X that holds the number 5. Without knowing this is a number no tool can auto generate a UML diagram for you. 例如,您可能有一个保存数字5的键X。不知道这是一个数字,没有工具可以为您自动生成UML图。 As the tool would need to know the type of the data in advance. 由于该工具需要事先知道数据的类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM