Enhancement Request: Nicer Json output for `info` command

Aperta
#147 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
android, java
Ambito
cli

Direzione di ricerca

Start by running java -jar apkeditor.jar info -i input.apk -t json and reading the info command's JSON output path. The requested result is one JSON object containing all the key-value pairs, rather than a list of one-pair objects; done means lookups such as result.getString("activity-main") can retrieve the corresponding value.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When I run:
java -jar apkeditor.jar info -i input.apk -t json
It outputs a JSON list of many Dicts. For example:

[
 {
  "package":"com.waze"
 },
 {
  "VersionCode":1021577
 },
 {
  "VersionName":"9999.46.0.2"
 },
 {
  "AppName":"Waze"
 },
 {
  "AppIcon":"res/drawable-ldpi-v4/launch_icon.png"
 },
 {
  "application-class":"com.waze.WazeApplication"
 },
 {
  "activity-main":"com.waze.FreeMapAppActivity"
 }
]

This isn't the most optimized output for anything automated. Lookups are not easy. It would better to have this output:

[
 {
  "package":"com.waze",
  "VersionCode":1021577,
  "VersionName":"9999.46.0.2",
  "AppName":"Waze",
  "AppIcon":"res/drawable-ldpi-v4/launch_icon.png",
  "application-class":"com.waze.WazeApplication",
  "activity-main":"com.waze.FreeMapAppActivity",
 }
]

With this output, it will be easy to lookup any key and get a value. Example: result.getString("activity-main");. The current implementation looking through each set of key, value to find the right one.

@REAndroid please let me know your thoughts, thank you for this amazing project!

Lingua principale
Java
Stelle
2.3k
Fork
417
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di REAndroid/APKEditor

Tutte le issue di REAndroid/APKEditor

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.