BobStore/app/src/test/resources/all_fields_index-v1.json
Hans-Christoph Steiner 40643855c4 do not let Jackson set instance vars that never come from index
Tell the Jackson JSON parser to ignore App/Apk fields that should never
come from the index, but instead are set locally to keep track of the
current state of things on the device.

There are two forms of tests to enforce that the proper things get
ignored.  It is not possible to do this with decorators alone, so I
chose to use @JsonIgnore and leave the variables we want filled in
undecorated.  Also, all of the instance variables in Apk/App/Repo
should come directly from the index metadata so that they are pure
data classes.  Currently some state info is stored in them, those are
decorated with @JsonIgnore.

The tests then include lists of accepted and ignored properties, and
anything that is not in those lists will cause the tests to fail.  So
if someone is adding a new instance variable, they will get a fail
until the tests are updated.  One set of tests actually writes blank
instances out as JSON since that's the easiest test to write, and
Jackson treats @JsonIgnore the same in both directions.  Then there is
another test that reads a JSON file with added, unsupported values to
make sure that they are properly ignored.
2017-03-31 09:09:31 +11:00

94 lines
4.4 KiB
JSON

{
"repo": {
"timestamp": 1488828510109,
"version": 18,
"name": "Guardian Project Official Releases",
"icon": "guardianproject.png",
"address": "https://guardianproject.info/fdroid/repo",
"description": "The official app repository of The Guardian Project. Applications in this repository are official binaries build by the original application developers and signed by the same key as the APKs that are released in the Google Play store. ",
"secret": "trying to sneak something in",
"mirrors": [
"http://bdf2wcxujkg6qqff.onion/fdroid/repo",
"https://guardianproject.info/fdroid/repo",
"https://s3.amazonaws.com/guardianproject/fdroid/repo"
]
},
"apps": [
{
"categories": [
"Security",
"GuardianProject"
],
"suggestedVersionCode": "999999999",
"description": "<p>Android 4+ allows you to disable certificates from the system Settings and root isn't required, so try that first if you want to manually mess with the certificates. The app won't work with Android 4+ anyway.</p><p>An app to manage security certificates on your phone also containing a version of the Android CACert keystore derived from Mozilla. If a certificate has recently become untrusted you can either install an update to this app or you can backup and remove certificates by yourself.</p><p>Requires root: Yes, it writes to the system partition. You will need a device that has the \u2018grep\u2019 command on it (via busybox: present on most custom ROMs). If the \u2018save\u2019 doesn\u2019t work, then you will need to make your /system partition read-write by using a file explorer like <a href=\"fdroid.app:com.ghostsq.commander\">Ghost Commander</a> or via a command in <a href=\"fdroid.app:jackpal.androidterm\">Terminal Emulator</a>.</p>",
"issueTracker": "https://github.com/guardianproject/cacert/issues",
"license": "GPLv3",
"name": "CACertMan",
"secret": "trying to sneak something in",
"sourceCode": "https://github.com/guardianproject/cacert",
"summary": "Disable untrusted certificates",
"webSite": "https://guardianproject.info/2011/09/05/cacertman-app-to-address-diginotar-other-bad-cas",
"added": 1376863200000,
"icon": "info.guardianproject.cacert.4.png",
"packageName": "info.guardianproject.cacert",
"lastUpdated": 1383174000000
}
],
"packages": {
"info.guardianproject.cacert": [
{
"added": 1400018400000,
"apkName": "Courier-0.1.8.apk",
"hash": "e013db095e8da843fae5ac44be6152e51377ee717e5c8a7b6d913d7720566b5a",
"hashType": "sha256",
"minSdkVersion": "9",
"nativecode": [
"armeabi",
"x86"
],
"packageName": "info.guardianproject.courier",
"secret": "trying to sneak something in",
"sig": "d70ac6a02b53ebdd1354ea7af7b9ceee",
"size": 16536125,
"targetSdkVersion": "15",
"uses-permission": [
[
"android.permission.READ_EXTERNAL_STORAGE",
null
],
[
"android.permission.INTERNET",
null
],
[
"android.permission.BLUETOOTH",
null
],
[
"android.permission.BLUETOOTH_ADMIN",
null
],
[
"android.permission.VIBRATE",
null
],
[
"android.permission.ACCESS_NETWORK_STATE",
null
],
[
"android.permission.WRITE_EXTERNAL_STORAGE",
null
],
[
"android.permission.ACCESS_WIFI_STATE",
null
]
],
"versionCode": 14,
"versionName": "0.1.8"
}
]
}
}