/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/ |
H A D | jsoncheckertest.cpp | 44 char* json = (char*)malloc(length + 1);
local 45 size_t readLength = fread(json, 1, length, fp);
46 json[readLength] = '\0';
48 return json;
54 // jsonchecker/failXX.json
56 if (i == 1) // fail1.json is valid in rapidjson, which has no limitation on type of root element (RFC 7159).
58 if (i == 18) // fail18.json is valid in rapidjson, which has no limitation on depth of nesting.
61 sprintf(filename, "fail%d.json", i);
63 char* json = ReadFile(filename, length);
local 64 if (!json) {
84 char* json = ReadFile(filename, length); local [all...] |
H A D | namespacetest.cpp | 19 #define RAPIDJSON_NAMESPACE my::rapid::json
20 #define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json {
32 static const char json[] = "{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,4]}";
variable 39 doc.Parse(json);
50 StringStream s(json);
57 EXPECT_STREQ(json, buffer.GetString());
58 EXPECT_EQ(sizeof(json)-1, buffer.GetSize());
68 EXPECT_STREQ(json, buffer.GetString());
|
/packages/apps/UnifiedEmail/src/com/android/mail/preferences/ |
H A D | BackupSharedPreference.java | 19 import org.json.JSONException; 20 import org.json.JSONObject;
|
H A D | SimpleBackupSharedPreference.java | 21 import org.json.JSONArray; 22 import org.json.JSONException; 23 import org.json.JSONObject; 58 final JSONObject json = new JSONObject(); 59 json.put(KEY, mKey); 66 json.put(VALUE, array); 68 json.put(VALUE, mValue); 70 return json; 73 public static BackupSharedPreference fromJson(final JSONObject json) throws JSONException { argument 74 Object value = json [all...] |
/packages/apps/Bluetooth/src/com/android/bluetooth/mapclient/obex/ |
H A D | Message.java | 19 import org.json.JSONException; 20 import org.json.JSONObject; 169 JSONObject json = new JSONObject(); 172 json.put("handle", mHandle); 173 json.put("subject", mSubject); 174 json.put("datetime", mDateTime); 175 json.put("sender_name", mSenderName); 176 json.put("sender_addressing", mSenderAddressing); 177 json.put("replyto_addressing", mReplytoAddressing); 178 json [all...] |
H A D | Bmessage.java | 21 import org.json.JSONException; 22 import org.json.JSONObject; 148 JSONObject json = new JSONObject(); 151 json.put("status", mBmsgStatus); 152 json.put("type", mBmsgType); 153 json.put("folder", mBmsgFolder); 154 json.put("charset", mBbodyCharset); 155 json.put("message", mMessage); 160 return json.toString();
|
H A D | EventReport.java | 21 import org.json.JSONException; 22 import org.json.JSONObject; 185 JSONObject json = new JSONObject(); 188 json.put("type", mType); 189 json.put("handle", mHandle); 190 json.put("folder", mFolder); 191 json.put("old_folder", mOldFolder); 192 json.put("msg_type", mMsgType); 197 return json.toString();
|
/packages/apps/Test/connectivity/sl4n/rapidjson/example/simpledom/ |
H A D | simpledom.cpp | 13 const char* json = "{\"project\":\"rapidjson\",\"stars\":10}"; local 15 d.Parse(json);
|
/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
H A D | ListParams.java | 25 import org.json.JSONException; 26 import org.json.JSONObject; 91 JSONObject json = new JSONObject(); 93 json.put(LIMIT_KEY, mLimit); 94 json.put(USE_NETWORK_KEY, mUseNetwork); 98 return json.toString(); 112 JSONObject json = null; 114 json = new JSONObject(serializedParams); 115 final int limit = json.getInt(LIMIT_KEY); 116 final boolean useNetwork = json [all...] |
H A D | ReplyFromAccount.java | 28 import org.json.JSONException; 29 import org.json.JSONObject; 65 JSONObject json = new JSONObject(); 67 json.put(BASE_ACCOUNT_URI, baseAccountUri); 68 json.put(ADDRESS_STRING, address); 69 json.put(NAME_STRING, name); 70 json.put(REPLY_TO, replyTo); 71 json.put(IS_DEFAULT, isDefault); 72 json.put(IS_CUSTOM_FROM, isCustomFrom); 76 return json; 79 deserialize(Account account, JSONObject json) argument [all...] |
H A D | Account.java | 41 import org.json.JSONArray; 42 import org.json.JSONException; 43 import org.json.JSONObject; 263 JSONObject json = new JSONObject(); 265 json.put(AccountColumns.NAME, displayName); 266 json.put(AccountColumns.TYPE, type); 267 json.put(AccountColumns.SENDER_NAME, senderName); 268 json.put(AccountColumns.ACCOUNT_MANAGER_NAME, accountManagerName); 269 json.put(AccountColumns.ACCOUNT_ID, accountId); 270 json 315 buildFrom(JSONObject json) argument 378 Account(JSONObject json) argument [all...] |
H A D | Settings.java | 37 import org.json.JSONException; 38 import org.json.JSONObject; 203 private Settings(JSONObject json) { argument 204 signature = json.optString(SettingsColumns.SIGNATURE, sDefault.signature); 205 mAutoAdvance = json.optInt(SettingsColumns.AUTO_ADVANCE, sDefault.getAutoAdvanceSetting()); 206 snapHeaders = json.optInt(SettingsColumns.SNAP_HEADERS, sDefault.snapHeaders); 207 replyBehavior = json.optInt(SettingsColumns.REPLY_BEHAVIOR, sDefault.replyBehavior); 208 convListIcon = json.optInt(SettingsColumns.CONV_LIST_ICON, sDefault.convListIcon); 209 confirmDelete = json.optBoolean(SettingsColumns.CONFIRM_DELETE, sDefault.confirmDelete); 210 confirmArchive = json 327 newInstance(JSONObject json) argument [all...] |
/packages/apps/UnifiedEmail/tests/src/com/android/mail/providers/ |
H A D | AccountTests.java | 25 import org.json.JSONException; 26 import org.json.JSONObject; 63 final JSONObject json = new JSONObject(); 65 json.put(UIProvider.AccountColumns.NAME, "name"); 66 json.put(UIProvider.AccountColumns.TYPE, "type"); 67 json.put(UIProvider.AccountColumns.PROVIDER_VERSION, 1); 68 json.put(UIProvider.AccountColumns.CAPABILITIES, 2); 71 json.put(UIProvider.AccountColumns.SENDER_NAME, null); 73 final Account account = Account.newInstance(json.toString());
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
H A D | SuggestionExtras.java | 18 import org.json.JSONException;
|
H A D | JsonBackedSuggestionExtras.java | 18 import org.json.JSONException; 19 import org.json.JSONObject; 36 public JsonBackedSuggestionExtras(String json) throws JSONException { argument 37 mExtras = new JSONObject(json);
|
/packages/apps/Email/tests/src/com/android/emailcommon/provider/ |
H A D | AccountTest.java | 22 import org.json.JSONException; 23 import org.json.JSONObject; 29 final JSONObject json = new JSONObject(); 30 json.put(EmailContent.AccountColumns.DISPLAY_NAME, "David Hasselhoff"); 31 json.put(EmailContent.AccountColumns.EMAIL_ADDRESS, "dhoff@example.com"); 32 json.put(EmailContent.AccountColumns.SYNC_LOOKBACK, 42); 33 json.put(EmailContent.AccountColumns.SYNC_INTERVAL, 99); 34 json.put(Account.JSON_TAG_HOST_AUTH_RECV, getHostAuthJSON("receiver", "recpass").toJson()); 35 json.put(Account.JSON_TAG_HOST_AUTH_SEND, getHostAuthJSON("send", "sendpass").toJson()); 36 json [all...] |
H A D | HostAuthTests.java | 24 import org.json.JSONException; 25 import org.json.JSONObject; 224 final JSONObject json = new JSONObject(); 225 json.put(EmailContent.HostAuthColumns.PROTOCOL, "IMAP"); 226 json.put(EmailContent.HostAuthColumns.ADDRESS, "dhoff@example.com"); 227 json.put(EmailContent.HostAuthColumns.PORT, 1337); 228 json.put(EmailContent.HostAuthColumns.FLAGS, 293847); 229 json.put(EmailContent.HostAuthColumns.LOGIN, "dhoff"); 230 json.put(EmailContent.HostAuthColumns.PASSWORD, "daknightrida"); 231 json [all...] |
/packages/apps/Test/connectivity/sl4n/rapidjson/example/tutorial/ |
H A D | tutorial.cpp | 15 const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
local 16 printf("Original JSON:\n %s\n", json);
22 if (document.Parse(json).HasParseError())
26 char buffer[sizeof(json)];
27 memcpy(buffer, json, sizeof(json));
|
/packages/experimental/procstatlog/ |
H A D | procstatreport.py | 19 import json namespace 201 "id_js": json.write("total_cpu"), 203 "filename_js": json.write(files_url + "/total_cpu.csv"), 204 "options_js": json.write({ 243 "id_js": json.write("cpu_speed"), 245 "filename_js": json.write(files_url + "/cpu_speed.csv"), 246 "options_js": json.write({ 275 "id_js": json.write("context_switches"), 277 "filename_js": json.write(files_url + "/context_switches.csv"), 278 "options_js": json [all...] |
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/ |
H A D | Credential.java | 15 import org.json.JSONException; 16 import org.json.JSONObject; 174 final JSONObject json = new JSONObject(); 175 json.put(PROVIDER_COLUMN, mProviderId); 176 json.putOpt(ACCESS_TOKEN_COLUMN, mAccessToken); 177 json.putOpt(REFRESH_TOKEN_COLUMN, mRefreshToken); 178 json.put(EXPIRATION_COLUMN, mExpiration); 179 return json; 186 protected static Credential fromJson(final JSONObject json) { argument 189 c.mProviderId = json [all...] |
H A D | HostAuth.java | 32 import org.json.JSONException; 33 import org.json.JSONObject; 258 final JSONObject json = new JSONObject(); 259 json.put(HostAuthColumns.PROTOCOL, mProtocol); 260 json.put(HostAuthColumns.ADDRESS, mAddress); 261 json.put(HostAuthColumns.PORT, mPort); 262 json.put(HostAuthColumns.FLAGS, mFlags); 263 json.put(HostAuthColumns.LOGIN, mLogin); 264 json.putOpt(HostAuthColumns.PASSWORD, mPassword); 265 json 277 fromJson(final JSONObject json) argument [all...] |
/packages/services/Car/tools/emulator/ |
H A D | obd2_to_diagjson.py | 22 # ./obd2_to_diagjson.py --src file1.json --dst file2.json 26 import json namespace 32 return Json(json.load(file)) 88 return json.dumps(self.store) 147 def fromJson(cls, json): 149 event.setTimestamp(json.timestamp) 150 event.setType(json.type) 151 for intValue in json.intValues: 153 for floatValue in json [all...] |
/packages/services/Car/service/src/com/android/car/storagemonitoring/ |
H A D | WearEstimateRecord.java | 26 import org.json.JSONException; 27 import org.json.JSONObject; 52 WearEstimateRecord(@NonNull JSONObject json) throws JSONException { argument 53 mOldWearEstimate = new WearEstimate(json.getJSONObject("oldWearEstimate")); 54 mNewWearEstimate = new WearEstimate(json.getJSONObject("newWearEstimate")); 55 mTotalCarServiceUptime = json.getLong("totalCarServiceUptime"); 56 mUnixTimestamp = Instant.ofEpochMilli(json.getLong("unixTimestamp"));
|
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/ |
H A D | PMCStatusLogger.java | 21 import org.json.JSONArray; 22 import org.json.JSONException; 23 import org.json.JSONObject;
|
/packages/apps/Test/connectivity/sl4n/rapidjson/example/messagereader/ |
H A D | messagereader.cpp | 66 void ParseMessages(const char* json, MessageMap& messages) { argument 69 StringStream ss(json); 76 cout << " at offset " << o << " near '" << string(json).substr(o, 10) << "...'" << endl;
|