Problem/Motivation

It would be great if this module integrated with the JSON Field module to be able to store the data as a raw JSON data type.

Comments

PCate created an issue. See original summary.

kaszarobert’s picture

Status: Active » Postponed (maintainer needs more info)

Before doing this it would be good to discuss what advantages does it bring for us. Will we benefit easier maintainability, usability or speed with introducing this new dependency? Because it sounds a lot of extra work: we need to change widgets' and formatters' code to a new field type & also create upgrade path with field migration to the new JSON type. Also, we don't need to query separate things from the JSON structure. The JSON data is loaded only when we render the form widget and the table. I only want to do this if it's really worth it.

pcate’s picture

Status: Postponed (maintainer needs more info) » Active

Also, we don't need to query separate things from the JSON structure. The JSON data is loaded only when we render the form widget and the table.

That would be the primary purpose I had in mind for adding JSON field support. It would allow capabilities like this which would be very powerful.

For instance, I could see it being useful for content editors to enter spreadsheet-like data that Views could then query/filter and display in ways other than an HTML table.

kaszarobert’s picture

Assigned: Unassigned » kaszarobert

OK, then why not. I'm not familiar with JSON field module, so we need to investigate:
- if we need a new widget based on the current one, or can it be modified to support this other field type from JSON field module (without breaking backwards compatibility)
- for the formatters, it should be easier: maybe we don't need to json_decode a string during processing the output - if that field type gives us the JSON right away. I can't tell now, so this must be checked.
- also if that JSON field module defines multiple field types, we should consider if we want to support everything, or select a few.
- also we have to keep in mind that this should be an optional dependency right now. Existing code should continue to work.

  • kaszarobert committed fb6ceb97 on 2.0.x
    Issue #3303170 by PCate, kaszarobert: Add integration with JSON Field...
kaszarobert’s picture

Assigned: kaszarobert » Unassigned
Status: Active » Fixed

Well, it was easier than I expected. Will be out in the latest release.

  • kaszarobert committed fb6ceb97 on 3.0.x
    Issue #3303170 by PCate, kaszarobert: Add integration with JSON Field...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.