gpt4 book ai didi

java - 在android中保存该数据最合适的方式是什么

转载 作者:行者123 更新时间:2023-12-01 18:12:00 24 4
gpt4 key购买 nike

我正在制作一个应用程序,它会询问用户他的院系、部门和年级,然后显示科目列表。

问题是保存主题的最佳方式是什么,以便可以轻松检索它们并向用户显示它们。

我尝试了 XML,但它不起作用,现在我尝试了 JSON,但不确定它是否是存储此类数据的最佳方式?

答案:

as all people say the best way is to save the data in SQLite dataBase.

这是我的 JSON 的快照

{
"faculty_engineering": {
"name": "Engineering",
"department_prep": {
"name": "prep",
"grade_1": {
"term_1": {
"subjects": [
"Math",
"physics",
"English",
"Realisation",
"subject"
]
},
"term_2": {
"subjects": [
"chemistry",
"Math",
"fekh",
"Geometry",
"Entag",
"Mechanics"
]
}
}
},
"department_systems_and_computer_engineering": {
"name": "Systems and computer engineering",
"grade_1": {
"term_1": {
"subjects": [
"Programming",
"Electronics",
"Math",
"Circuits",
"Measure",
"English"
]
},
"term_2": {
"subjects": [
"Algorithms",
"Electronics",
"Math",
"Fields",
"Religious subject"
]
}
},
"grade_2": {
"term_1": {
"subjects": [
"Math",
"Integrated circuits",
"Systems and signals",
"machines VHDL",
"Numerical Analysis",
"Object-oriented programming",
"Tests",
"Realisation subject"
]
},
"term_2": {
"subjects": [
"Math",
"Logical circuits",
"Automatic Control",
"Electric machines",
"Religious subjects",
"Realisation subject"
]
}
},
"grade_3": {
"term_1": {
"subjects": [
"Math",
"Communications systems",
"Electronics",
"Religious subjects",
"Operating system",
"Digital Control",
"Tests ",
"Transition systems and mechanisms ",
"Power electric systems ",
"Realisation subject"
]
},
"term_2": {
"subjects": [
"Databases",
"Microprocessors",
"Administration and engineering projects",
"Sensors of adapters",
"Religious subjects",
"Realisation subject"
]
}
},
"grade_4": {
"term_1": {
"subjects": [
"Special computer subject",
"Tests",
"Engineering programming",
"Intelligent Systems",
"Computer architecture",
"Interpreters",
"Advanced software",
"Realisation subject"
]
},
"term_2": {
"subjects": [
"Algorithms",
"Advanced software",
"Computer architecture",
"Interpreters",
"Realisation subject"
]
}
}
},
"department_": {
"name": "",
"grade_1": {
"term_1": {
"subjects": [
]
},
"term_2": {
"subjects": [
]
}
},
"grade_2": {
"term_1": {
"subjects": [
]
},
"term_2": {
"subjects": [
]
}
},
"grade_3": {
"term_1": {
"subjects": [
]
},
"term_2": {
"subjects": [
]
}
},
"grade_4": {
"term_1": {
"subjects": [
]
},
"term_2": {
"subjects": [
]
}
}
}
}
}

最佳答案

如果要查询的数据不在远程服务器上,那么可以使用Android sqlite数据库来保存和获取数据。

关于java - 在android中保存该数据最合适的方式是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32273625/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com