Code Monkey home page Code Monkey logo

Comments (9)

francisfeng avatar francisfeng commented on September 25, 2024 1

近期内准备实现URL Decode,初步计划是在Object类型或者Array类型的节点上添加一个「URL Decode并在新窗口打开」的菜单项。在当前窗口Decode再更新的方案实现起来有点复杂,而且不够直观。

还可能添加一个默认关闭的「自动URL Decode」的设置,但我不太确定这个设置是否应该添加:有些用户可能忘记打开过这个选项,然后对格式化结果产生误会。

如果你有脱敏的这类JSON数据,不妨提供测试。

from everything-okjson.

francisfeng avatar francisfeng commented on September 25, 2024 1

新版本已在 App Store 发布。

from everything-okjson.

Kyle-Ye avatar Kyle-Ye commented on September 25, 2024

核心问题是第三方部分接口返回数据不规范,没有全部走JSON,而是部分走了String😂
截屏2021-09-09 16 58 40

from everything-okjson.

Kyle-Ye avatar Kyle-Ye commented on September 25, 2024

目前可以直接使用新建支持"{\"cell_type\":304,\"data_type\":1}"这类字符串,会提示修复,但是不可以在一个JSON内直接对某一value进行"修复"

from everything-okjson.

francisfeng avatar francisfeng commented on September 25, 2024

第一个我看看怎么支持好一点,可能是直接在菜单项内显示解码结果。

第二个的话,如果仅仅是想看格式化的JSON,现在的版本里,选中节点,然后按下空格键或者在右键菜单里选择快速查看,就能看到格式化的JSON。

后面会加上直接将这类字符串在OK JSON打开的菜单项。

from everything-okjson.

Kyle-Ye avatar Kyle-Ye commented on September 25, 2024

第一个我看看怎么支持好一点,可能是直接在菜单项内显示解码结果。

第二个的话,如果仅仅是想看格式化的JSON,现在的版本里,选中节点,然后按下空格键或者在右键菜单里选择快速查看,就能看到格式化的JSON。

后面会加上直接将这类字符串在OK JSON打开的菜单项。

嗯嗯,第二个目前是可以Quick Look的,或者复制值后⇧⌘ N新建打开也会提示修复后打开
截屏2021-09-10 10 11 58

我指的是可以基于节点在当前的JSON中直接修改值转化会不会更好呢?
选中某一节点右键,弹出context menu
menu4: Percent-decoding(对该节点的所有子节点递归进行百分号解码,String Node Only,String -> String)
menu5: Percent-encoding(对该节点的所有子节点递归进行百分号编码,String Node Only,String -> String)(可选,可能对该工具无太大价值)
menu6:⭐️ un-escaped text (对该节点的所有子节点递归进行反转义,String Node Only,String -> JSON Object)

截屏2021-09-10 10 23 05

同时可以和👆仅出现在Object上的菜单项一样,上述菜单仅出现在String Node或Object Node(方便递归对多个String操作)上

示意图

截屏2021-09-10 10 25 40

截屏2021-09-10 10 29 27

这两个操作都会对该JSON字符串进行不可逆(?)转换,可能需要加上destructive暗示(hintColor red or confirm confirmationDialog)

以上仅为个人需求和建议,仅供参考♥️

from everything-okjson.

Kyle-Ye avatar Kyle-Ye commented on September 25, 2024

第一个我看看怎么支持好一点,可能是直接在菜单项内显示解码结果。

第二个的话,如果仅仅是想看格式化的JSON,现在的版本里,选中节点,然后按下空格键或者在右键菜单里选择快速查看,就能看到格式化的JSON。

后面会加上直接将这类字符串在OK JSON打开的菜单项。

理解作者您的考虑,可能这种属于corner case,不是高频操作或者认为一个JSON中不需要太多这类转化,所以一个轻量的Quick Look或者新建窗口即可

但是有些人群所面对的API可能比较不太友好,一个JSON中有50+这种case,这时一个一键decode就特别有帮助了🥺

但不知道这类人群多不多,辛苦作者做个 trade-off 考虑一下吧 ♥️

from everything-okjson.

Kyle-Ye avatar Kyle-Ye commented on September 25, 2024

(或者给用户自己针对不同Node添加 Menu 的权利,但感觉设计这样一套API + 接口比单纯这个需求复杂多了,ROI不高🤣)

from everything-okjson.

Kyle-Ye avatar Kyle-Ye commented on September 25, 2024

暂时没有脱敏数据,我去找下第三方的URL JSON集,手动URL Encode一下吧

from everything-okjson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.