[PR #813] [MERGED] Modify responseType by Object(json) or Array(json5) #2873

Closed
opened 2026-03-17 00:32:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/813
Author: @shtakai
Created: 4/26/2020
Status: Merged
Merged: 4/26/2020
Merged by: @liyasthomas

Base: masterHead: feature/json_array


📝 Commits (1)

  • 868eab0 Modify responseType by Object(json) or Array(json5)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 pages/index.vue (+1 -1)

📄 Description

Why?

support response json array · Issue #805 · liyasthomas/postwoman

How?

Behavior

Editor component can't recognize json Array.
(It accepts json Object.)
If JSON Array, set this.responseBodyType 'json5'.

Fixing

  • When 'responseTypeisjson/ etc`, responseBodyType will be set
    • json : response.body.type's constructor name is Object. (Usual case)
    • json5 : response.body.type's constructor name is Array. (#805 's case)

Screenshots

  • JSON Array
    Screenshot from 2020-04-26 13-30-24
    Screenshot from 2020-04-26 13-30-51

  • JSON Object
    Screenshot from 2020-04-26 13-41-56
    Screenshot from 2020-04-26 13-42-05


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/813 **Author:** [@shtakai](https://github.com/shtakai) **Created:** 4/26/2020 **Status:** ✅ Merged **Merged:** 4/26/2020 **Merged by:** [@liyasthomas](https://github.com/liyasthomas) **Base:** `master` ← **Head:** `feature/json_array` --- ### 📝 Commits (1) - [`868eab0`](https://github.com/hoppscotch/hoppscotch/commit/868eab0344656cf2ebc4792f90bfc8a34a6bf173) Modify responseType by Object(json) or Array(json5) ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pages/index.vue` (+1 -1) </details> ### 📄 Description ## Why? [support response json array · Issue #805 · liyasthomas/postwoman](https://github.com/liyasthomas/postwoman/issues/805) ## How? ### Behavior Editor component can't recognize json Array. (It accepts json Object.) If JSON Array, set this.responseBodyType 'json5'. ### Fixing - When 'responseType` is `json/ etc`, responseBodyType will be set - `json` : response.body.type's constructor name is `Object`. (Usual case) - `json5` : response.body.type's constructor name is `Array`. (#805 's case) ## Screenshots - JSON Array ![Screenshot from 2020-04-26 13-30-24](https://user-images.githubusercontent.com/2187465/80297966-4a1cdf00-87c3-11ea-84f4-1c6853408d44.png) ![Screenshot from 2020-04-26 13-30-51](https://user-images.githubusercontent.com/2187465/80297968-4db06600-87c3-11ea-8cc0-ad95f29ca236.png) - JSON Object ![Screenshot from 2020-04-26 13-41-56](https://user-images.githubusercontent.com/2187465/80298070-c6afbd80-87c3-11ea-9002-6505bf9afec3.png) ![Screenshot from 2020-04-26 13-42-05](https://user-images.githubusercontent.com/2187465/80298072-cc0d0800-87c3-11ea-8e0d-02545da49284.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 00:32:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#2873
No description provided.