How to open local JSON file? Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

How to open local JSON file?

Unread post by szczelnybez » 2022-01-14, 13:07

It appears that PM opens JSON files correctly from remote servers and not from local drive, i.e. "file:///..."
From local drive files are being opened in a text format instead of tree-view structure. I have devtools.jsonview.enabled set to true. I also tried adding prefix "view-source:" to no avail. FF seems to open local files correctly. Any hints please?

Regards

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-14, 13:14

WORKSFORME
(by the way, json viewer is enabled by default, no need to set any preferences manually for it)

How exactly are you opening the json file?
Attachments
jsonview1.png
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

Re: How to open local JSON file?

Unread post by szczelnybez » 2022-01-14, 14:01

Hi Moonchild,

What is WORKSFORME?
I open them using File-> Open File... and expect to see the result as per your attached image. However, for some reason, they present themselves as text files.
It happens either:
- if download a remote file directly to my drive and then open it manually in PM,
- or I first connect to a remote file in the browser (which shows correctly as per you attachment), then File --> save page as a file locally and reopen it in browser.
There must be some setting that causes it or AddOn maybe...
My version is 29.4.3 and Win10 64bit.

Regards

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-15, 00:16

szczelnybez wrote:
2022-01-14, 14:01
What is WORKSFORME?
A jab at bug labels. It's "Works for me".

I tried the exact same method using File->Open and the result is the same (it works). Initially I dragged and dropped the file.

Please reply with the output of Help -> Troubleshooting information pasted in your post (please use the forum's hide or code tags)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 937
Joined: 2017-12-14, 12:59

Re: How to open local JSON file?

Unread post by gepus » 2022-01-15, 07:02

Me too. :)
Pale Moon opens JSON files from my local drive in text format.

Tested with a fresh profile (hence no Troubleshooting information) -> Pale Moon 29.4.3/Win7.

User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

Re: How to open local JSON file?

Unread post by szczelnybez » 2022-01-15, 14:23

MoonChild,

Here's the troubleshooting log:
Application Basics
------------------

Name: Pale Moon
Version: 29.4.3 (64-bit)
Build ID: 20211209125507
Update Channel: release
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Goanna/4.8 Firefox/68.0 PaleMoon/29.4.3
OS: Windows_NT 10.0
Safe Mode: false

Extensions
----------

Name: Adblock Latitude
Version: 5.0.8
Enabled: false
ID: adblocklatitude@addons.palemoon.org

Name: Cookie Masters
Version: 3.2.0
Enabled: false
ID: {a04a71f3-ce74-4134-8f86-fae693b19e44}

Name: CookieKeeper
Version: 1.9.3.1
Enabled: false
ID: cookiekeeper@cookiekeeper.mozdev.org

Name: Dismiss The Overlay
Version: 1.0.6
Enabled: false
ID: behind-the-overlay-me@Off.JustOff

Name: Lull The Tabs
Version: 1.5.1
Enabled: false
ID: lull-the-tabs@Off.JustOff

Name: My_Comm
Version: 0.1
Enabled: false
ID: My_Comm@example.org

Name: my_cors
Version: 0.55
Enabled: false
ID: extensionname@example.org

Name: QuickPrefBar
Version: 8.0.5
Enabled: false
ID: {f32bbb67-6cdb-4536-8b10-b55ef5bec9b4}

Name: uBlock Origin
Version: 1.16.4.27
Enabled: false
ID: uBlock0@raymondhill.net

Graphics
--------

Features
Compositing: Direct3D 11
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Asynchronous Pan/Zoom: none
WebGL 1 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 000000000000cf35) EGL_VERSION: 1.4 (ANGLE 2.1.0.) EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 1 Driver Renderer: Google Inc. -- ANGLE (Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0)
WebGL 1 Driver Version: OpenGL ES 2.0 (ANGLE 2.1.0.)
WebGL 1 Driver Extensions: GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_EXT_color_buffer_half_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_OES_compressed_ETC1_RGB8_texture GL_EXT_sRGB GL_ANGLE_depth_texture GL_OES_depth32 GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_disjoint_timer_query GL_EXT_robustness GL_EXT_blend_minmax GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_pack_reverse_row_order GL_OES_standard_derivatives GL_EXT_shader_texture_lod GL_EXT_frag_depth GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_EXT_discard_framebuffer GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_NV_EGL_stream_consumer_external GL_EXT_unpack_subimage GL_NV_pack_subimage GL_OES_vertex_array_object GL_KHR_debug GL_ANGLE_lossy_etc_decode GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_sync_query GL_CHROMIUM_copy_texture
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_frag_depth EXT_shader_texture_lod EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug_get OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture
WebGL 2 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 000000000000cf35) EGL_VERSION: 1.4 (ANGLE 2.1.0.) EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 2 Driver Renderer: Google Inc. -- ANGLE (Intel(R) HD Graphics Direct3D11 vs_5_0 ps_5_0)
WebGL 2 Driver Version: OpenGL ES 3.0 (ANGLE 2.1.0.)
WebGL 2 Driver Extensions: GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_EXT_color_buffer_half_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_OES_compressed_ETC1_RGB8_texture GL_EXT_sRGB GL_ANGLE_depth_texture GL_OES_depth32 GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_disjoint_timer_query GL_EXT_robustness GL_EXT_blend_minmax GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_pack_reverse_row_order GL_OES_standard_derivatives GL_EXT_shader_texture_lod GL_EXT_frag_depth GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_EXT_discard_framebuffer GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_NV_EGL_stream_consumer_external GL_EXT_unpack_subimage GL_NV_pack_subimage GL_EXT_color_buffer_float GL_OES_vertex_array_object GL_KHR_debug GL_ANGLE_lossy_etc_decode GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_sync_query GL_CHROMIUM_copy_texture GL_EXT_texture_norm16
WebGL 2 Extensions: EXT_color_buffer_float EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug_get OES_texture_float_linear WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc
Hardware H264 Decoding: Yes; Using D3D11 API
Audio Backend: wasapi
Direct2D: true
DirectWrite: true (10.0.14393.1358)
GPU #1
Active: Yes
Description: Intel(R) HD Graphics
Vendor ID: 0x8086
Device ID: 0x22b1
Driver Version: 20.19.15.5063
Driver Date: 10-29-2018
Drivers: igdumdim64 igd10iumd64 igd10iumd64 igd12umd64 igdumdim32 igd10iumd32 igd10iumd32 igd12umd32
Subsys ID: 00000000
RAM: Unknown

Diagnostics
AzureCanvasAccelerated: 0
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: cairo





Important Modified Preferences
------------------------------

accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.capacity: 358400
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.download.importedFromSqlite: true
browser.places.smartBookmarksVersion: 4
browser.sessionstore.privacy_level: 2
browser.startup.homepage_override.buildID: 20211209125507
browser.startup.homepage_override.mstone: 4.8.3
dom.max_script_run_time: 0
extensions.lastAppVersion: 29.4.3
font.internaluseonly.changed: false
general.useragent.override.hsbc.co.uk: Mozilla/5.0 (%OS_SLICE% rv:68.9) Gecko/20100101 Firefox/68.9
general.useragent.override.paypal.com: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0
general.useragent.override.pornhub.com: Chrome
general.useragent.updates.lastupdated: 1642246491402
gfx.crash-guard.d3d11layers.appVersion: 29.4.3
gfx.crash-guard.d3d11layers.deviceID: 0x22b1
gfx.crash-guard.d3d11layers.driverVersion: 20.19.15.5063
gfx.crash-guard.d3d11layers.feature-d2d: true
gfx.crash-guard.d3d11layers.feature-d3d11: true
gfx.crash-guard.status.d3d11layers: 2
gfx.crash-guard.status.d3d11video: 2
gfx.crash-guard.status.d3d9video: 2
gfx.direct3d.last_used_feature_level_idx: 0
media.benchmark.vp9.fps: 38
media.benchmark.vp9.versioncheck: 3
media.gmp.storage.version.observed: 1
media.hardware-video-decoding.failed: false
network.cookie.lifetimePolicy: 2
network.cookie.prefsMigrated: true
places.database.lastMaintenance: 1642076822
places.history.expiration.transient_current_max_pages: 61681
plugin.importedState: true
privacy.clearOnShutdown.cookies: false
privacy.clearOnShutdown.downloads: false
privacy.clearOnShutdown.formdata: false
privacy.clearOnShutdown.history: false
privacy.clearOnShutdown.sessions: false
privacy.cpd.connectivityData: true
privacy.cpd.formdata: false
privacy.cpd.offlineApps: true
privacy.cpd.sessions: false
privacy.sanitize.migrateFx3Prefs: true
privacy.sanitize.sanitizeOnShutdown: true
privacy.sanitize.timeSpan: 0
security.disable_button.openCertManager: false
services.sync.declinedEngines:
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1641241369
ui.osk.debug.keyboardDisplayReason: IKPOS: Touch screen not found.

Important Locked Preferences
----------------------------

Places Database
---------------

JavaScript
----------

Incremental GC: true

Accessibility
-------------

Activated: false
Prevent Accessibility: 1

Library Versions
----------------

NSPR
Expected minimum version: 4.25
Version in use: 4.25

NSS
Expected minimum version: 3.52.2
Version in use: 3.52.2

NSSSMIME
Expected minimum version: 3.52.2
Version in use: 3.52.2

NSSSSL
Expected minimum version: 3.52.2
Version in use: 3.52.2

NSSUTIL
Expected minimum version: 3.52.2
Version in use: 3.52.2
You can see I've also disabled all the AddOns which had no effect on the issue...
Just FYI a screenshot how it looks like:
Image
Edit:
Just realized the above file wouldn't open in FF either due to missing quotes. I've added them and now FF opens it properly, sadly not PM... Screenshot below:
Image
Regards

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-15, 16:18

Not sure if I see this correctly with your jacked up fonts in your screenshots, but are the outer-most brackets square? If so, that's not valid JSON. Invalid JSON won't be pretty-printed.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

Re: How to open local JSON file?

Unread post by szczelnybez » 2022-01-15, 16:53

with your jacked up fonts in your screenshots
Not sure why this happened but when you right click and select "view image" you can see the original resolution.
are the outer-most brackets square?
Yes.

I've reedited the file again (even though previous version was recognized by FF) and unfortunately it didn't help, see below.
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-15, 17:03

Looking into this a bit more seems the json spec has changed to now be a pretty much "anything goes" kind of deal, which I find odd, but eh. :|

Anyway, it seems our version of the developer tools content sniffer isn't detecting it as json notation and as such displays the raw text instead of launching the "pretty" json viewer. Since there are no other indications about the file's type when opening from a local file (a web server would explicitly indicate content-type making this work) there isn't really a way to work around this at the moment. The browser isn't primarily designed to be a local file viewer so you can consider that a limitation of using a web browser as such.

It's on my radar now but I have no idea when we'll get to it.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

Re: How to open local JSON file?

Unread post by szczelnybez » 2022-01-15, 19:07

My advise would be first to check the extension (i.e. *.json) and then try to parse it through the json viewer in the background, if possible. The viewer must/should have a way of telling if the code is fine or throw an error. Only if latter, json should be opened as a text file.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-15, 22:40

It's not that simple when you are dealing with potentially hostile content. You can't just throw random parsers at it and "hope for the best, try something else if it fails".
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: How to open local JSON file?

Unread post by vannilla » 2022-01-16, 18:11

Works for me™ with OP's JSON files.
Attachments
t.png

User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

Re: How to open local JSON file?

Unread post by szczelnybez » 2022-01-16, 19:17

"hope for the best, try something else if it fails"
You can, providing the viewer isn't security critical, privileged piece of code. If it is then I agree.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-16, 19:34

szczelnybez wrote:
2022-01-16, 19:17
"hope for the best, try something else if it fails"
You can, providing the viewer isn't security critical, privileged piece of code. If it is then I agree.
Anything not explicitly running as a content viewer with all the safeguards that come with it is security-critical, privileged code. I simply disagree with your suggestion because it's not only wasteful trial-and-error, it's also something that would make many more parts of the code in need of sec audit with that approach as the attack surface will grow exponentially.

However, I've also, verified that we at least support your json structure, and we do (including top-level array structures, not strictly object structures as I suspected with my slightly outdated knowledge of the json specification).
So, something else seems to be going on here. Does your json have a BOM marker, by any chance?

Can you please attach the file you're having trouble with?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 937
Joined: 2017-12-14, 12:59

Re: How to open local JSON file?

Unread post by gepus » 2022-01-16, 20:38

Weird.
All JSON-files (files within Pale Moon's profile folder) opened with Pale Moon show only the raw data.
There is no option to toggle between raw data and JSON.
No problem with my secondary browser.
Attachments
json1.png
json2.png

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-16, 21:43

gepus wrote:
2022-01-16, 20:38
All JSON-files (files within Pale Moon's profile folder) opened with Pale Moon show only the raw data.
No problem here. I even tried putting xulstore.json from my profile in the exact same path shown in your address bar and it's all good.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
gepus
Keeps coming back
Keeps coming back
Posts: 937
Joined: 2017-12-14, 12:59

Re: How to open local JSON file?

Unread post by gepus » 2022-01-16, 22:50

Thanks for testing.
In fact it is not an issue for me.
Only irritation on my part was: why does it work for others and doesn't for me. :x :coffee:

Michaell
Lunatic
Lunatic
Posts: 282
Joined: 2018-05-26, 18:13

Re: How to open local JSON file?

Unread post by Michaell » 2022-01-17, 01:40

Doesn't work for me either, gepus. Just raw text. Honestly I don't know if it ever did. Several years ago, I installed a JSON Viewer program and a plugin for another editor for that purpose. (Just reporting, did not troubleshoot.)
Win10home(1709), PM33.0.0-portable as of Feb 1, '24

User avatar
szczelnybez
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2021-01-20, 00:11

Re: How to open local JSON file?

Unread post by szczelnybez » 2022-01-17, 12:43

Moonchild wrote:
2022-01-16, 19:34
szczelnybez wrote:
2022-01-16, 19:17
"hope for the best, try something else if it fails"
You can, providing the viewer isn't security critical, privileged piece of code. If it is then I agree.
Anything not explicitly running as a content viewer with all the safeguards that come with it is security-critical, privileged code.
Fair enough, security first!
Looking at other's comments it appears it's not only me who has troubles opening various json files. I'm not sure about BOM marker, but the file's content is as displayed in the previous screenshot.
Can you please attach the file you're having trouble with?
Not sure how to attach a file in this forum but here is a copy & paste of the "pmoon2.json":
{
"type": "color",
"list": [

{
"color": "red",
"value": "#f00"
},
{
"color": "green",
"value": "#0f0"
},
{
"color": "blue",
"value": "#00f"
},
{
"color": "cyan",
"value": "#0ff"
},
{
"color": "magenta",
"value": "#f0f"
},
{
"color": "yellow",
"value": "#ff0"
},
{
"color": "black",
"value": "#000"
}
]
}

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: How to open local JSON file?

Unread post by Moonchild » 2022-01-17, 13:33

no, you really have to attach it. copy/pasting won't help if there's a byte-level issue that won't show up in processed plaintext post bodies.
At the bottom of the post writing area when you reply are 2 tabs, "options" and "attachments". Click "attachments" and follow the obvious steps from there to add the file (you probably need to zip it up).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked