Enhancement Request: Nicer Json output for `info` command

オープン
#147 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
android, java
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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!

主要言語
Java
スター
2.3k
フォーク
417
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

REAndroid/APKEditor のほかの issue

REAndroid/APKEditor の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。