首页 \ 问答 \ 如何应用所有数据库的通用设计?(How to apply the common design for all database?)

如何应用所有数据库的通用设计?(How to apply the common design for all database?)

我有三十个笔记数据库。 每个数据库大约有20多个表单和50个视图。 我们计划进行设计更改[表格样式,操作栏,视图,表格等]。 我们设计了一种通用样式并应用于数据库。 现在他们无论如何直接将设计应用于所有数据库?


I am having a thirty of notes databases. Each database has more than 20 forms and fifty views approximately. We planned for design change [Style of form, Action bar, View, tables and etc.,]. We designed a common style and applied to a database. Now Is their anyway to apply the design directly for all database?


原文:https://stackoverflow.com/questions/11112741
更新时间:2022-03-16 09:03

最满意答案

Android SDK提供JSONObject 。 这可以通过导入org.json.JSONObject来使用。

JSONObject的文档在这里

任何其他变体将来自库或链接的项目。 cricket_007给出的例子是来自Gson库的JsonObject 。 这可以通过导入com.google.gson.JsonObject来使用。

JsonObject的文档在这里

请注意JSONObjectJsonObject import语句的区别 - 它们是不同包中的不同类。 它们可以有不同的方法和功能,采用不同的参数等,但最终它们会做相同或相似的事情(持有Json对象的内容)。 这取决于您使用的。 每个JavaDoc都会介绍如何使用它,每个网站都有大量的资源。


The Android SDK provides JSONObject. This can be used by importing org.json.JSONObject.

The documentation for JSONObject is here.

Any other variant will be from a library or linked project. The exmaple given by cricket_007 is JsonObject from the Gson libraries. This can be used by importing com.google.gson.JsonObject.

The documentation for JsonObject is here.

Note the difference in import statement for JSONObject and JsonObject - they are different classes in different packages. They can have different methods and functionality, take different parameters etc, but ultimately they will do the same or similar thing (holding a Json Object's contents). It is up to you which you use. The JavaDoc for each will describe how to use it, and there are plenty of resources online for each.

相关问答

更多
  • using System.Json;添加using System.Json; 到你的文件的顶部。 编辑 似乎Windows Phone 7不支持System.Json命名空间,因此您不能这样做。 粗略搜索后,您似乎必须使用此 MSDN视频/源代码中所示的DataContractJsonSerializer类。 您可能还想考虑使用Json.NET ,它看起来比DataContractJsonSerializer更有效。 Add using System.Json; to the top of your fil ...
  • 您可以通过首先访问迭代对象来访问找到的数组json对象; 你不要覆盖jsonObject来访问你想要的对象: for (Object aJsonArray : arr) { JSONObject foundJsonObject = (JSONObject) aJsonArray; JSONArray postsArr = (JSONArray) foundJsonObject.get("posts"); for (Object bJsonArray : p ...
  • System.out.println((String) obj); 听起来就像你没有有效的JSON数据,如果你有'未定义'的话。 未定义的Javascript就像Java中的'null'一样。 System.out.println((String) obj); Sounds like you don't have valid JSON data in there in the first place if you have 'undefined' in it. Javascript undefined ...
  • Singleton设计模式限制实例化,并确保JVM中只存在该类的一个实例。 换句话说,当您实现Singleton时,目的是确保每次调用getInstance()方法时都使用相同的实例。 关于你的代码,条件if (instance == null)是无用的,你的getInstance()方法相当于: public static JSONObject getInstance() { return instance; } Singleton design pattern restricts the ...
  • 那么你可以尝试将它作为String处理,只需将新对象插入父对象中即可。 private static JSONObject insertObj(JSONObject parent, JSONObject child){ String parentStr = parent.toString(); parentStr = parentStr.substring(1);//remove the opening curly bracket { String childStr = ch ...
  • 我想你正在使用org.json。 JSONArray array = new JSONArray(s); int length = array.length(); for (int i = 0; i < length; i++) { JSONObject o = array.getJSONObject(i); System.out.println(o); } 其中s是你的String 。 I suppose you are using org.json for that. JSONArra ...
  • 您的响应结构是: JSONObject key:value JSONObject (key: "Matches") JSONArray (key: "A") JSONObject, key:value, key:value, etc... JSONObject 要访问A ,请按照以下步骤操作: 从您的响应中创建JSONObject: JSONObject jsonResponseObj = ne ...
  • Android SDK提供JSONObject 。 这可以通过导入org.json.JSONObject来使用。 JSONObject的文档在这里 。 任何其他变体将来自库或链接的项目。 cricket_007给出的例子是来自Gson库的JsonObject 。 这可以通过导入com.google.gson.JsonObject来使用。 JsonObject的文档在这里 。 请注意JSONObject和JsonObject import语句的区别 - 它们是不同包中的不同类。 它们可以有不同的方法和功能,采 ...
  • 它不是JSONObject ,而是JSONArray 从你的问题: { "nameservice": [ { "id": 7413, "name": "ask" }, { "id": 7414, "name": "josn" }, { "id": 7415, "name": "john" }, { "id": 7418, "name": "RjhjhjR" } ] } [在nameservice键后面告诉你它是一个数组。 它需要是一个{来表示一个对象,但事实并非如此 因此,更改您的代码以将其用作JSONA ...
  • {表示JSONObject, [表示JSONArray 在你的json产品中代表JSONArray而不是Object 这样做是为了获得名称字符串。 JSONObject nodeRoot = new JSONObject(line); JSONArray nodeStats = nodeRoot.getJSONArray("products"); for(int i=0; i < nodeStats.length();i++){ String sSDR = nodeStats.getJSONObject ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。