简体   繁体   English

UML如何表示JSON文件

[英]UML how to represent JSON file

Quick question: I'm loading in a JSON file that is stored inside of my repository.快速提问:我正在加载一个存储在我的存储库中的 JSON 文件。 How do I represent the JSON file, if it's needed at all?如果完全需要,我该如何表示 JSON 文件?

If you need the object you just show it as Artifact (p. 654 UML 2.6):如果您需要该对象,您只需将其显示为 Artifact(第 654 页 UML 2.6):

An Artifact represents some (usually reifiable) item of information that is used or produced by a software development process or by operation of a system.工件表示由软件开发过程或系统操作使用或产生的一些(通常是可具体化的)信息项。 Examples of Artifacts include model files, source files, scripts, executable files, database tables, development deliverables, word-processing documents, and mail messages.工件的示例包括模型文件、源文件、脚本、可执行文件、数据库表、开发可交付成果、文字处理文档和邮件消息。

It is shown as rectangle like a class with a "file-like" decorator top right.它显示为矩形,就像一个在右上角带有“类文件”装饰器的类。 P. 655:第 655 页:

An Artifact is presented using an ordinary Class rectangle with the keyword «artifact». Artifact 使用带有关键字 «artifact» 的普通 Class 矩形表示。 Alternatively, it may be depicted by an icon (such as the document icon shown in Figure 19.9).或者,它可以用一个图标来描述(例如图 19.9 中所示的文档图标)。 Optionally, the underlining of the name of an artifact instance may be omitted, as the context is assumed to be known to users.可选地,可以省略工件实例名称的下划线,因为假设上下文为用户所知。

If you need the structure you would rather show it as class with the single attributes contained inside.如果您需要该结构,您宁愿将其显示为内部包含单个属性的类。

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

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