Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/Zignature/json
Browse files Browse the repository at this point in the history
  • Loading branch information
Zignature committed Nov 29, 2021
2 parents 8fb6030 + f446a4b commit 9f87067
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 2,264 deletions.
48 changes: 2 additions & 46 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ Since this plugin only outputs data I don't expect any damage but I will not acc
Since EE4 it is possible to use custom fields outside of field groups as well as inside field groups. This plugin will not work when a new custom field is assigned as a standalone custom field as well as a grouped custom field within the same channel. You need to choose to use either a grouped custom field or a standalone custom field. This is because newly created custom fields get their own table in the database.
Since legacy custom fields do not have their own table they will work fine either way.

<<<<<<< HEAD
***Fluid fieldtype***

Fluid fieldtype is not yet supported.

=======
>>>>>>> Dev
## Installation

* Copy the `/system/user/addons/json/` folder to your `/system/user/addons/` folder
Expand Down Expand Up @@ -190,17 +183,12 @@ Most custom fields will just return the raw column data from the `exp_channel_da

##### Date

<<<<<<< HEAD
The data will be the Unix timestamp, accurate to milliseconds. This is because the native JavaScript Date object accepts a millisecond-based timestamp in its constructor.
=======
The data will be the Unix timestamp, accurate to milliseconds. This is because the native JavaScript Date object accepts a millisecond-based timestamp in its constructor. Date can be formatted with using the `date_format=` parameter as mentioned above.
>>>>>>> Dev

```
your_date_field: 1385661660000
```

<<<<<<< HEAD
##### Grid

The data will include an array of Grid rows, including the row_id and the column names:
Expand All @@ -218,7 +206,8 @@ your_grid_field: [
other_col_name: "qux"
}
]
=======
```

##### Fluid

The data will include an array of custom fields ordered by Fluid field order.
Expand Down Expand Up @@ -259,15 +248,13 @@ When a custom field is duplicated, the data will be returned in an array. In the
}
]
}
>>>>>>> Dev
```

##### File Grid (EE v5.1+)

The data will include an array of File Grid rows including the row_id, the file and the optional extra column names:

```
<<<<<<< HEAD
your_file_grid_field: [
{
row_id: 1,
Expand All @@ -281,30 +268,11 @@ your_file_grid_field: [
my_col_name: "baz",
other_col_name: "qux"
}
=======
"your_grid_field": [
{
"row_id": 1,
"my_col_name": "foo",
"other_col_name": "bar"
},
{
"row_id": 2,
"my_col_name": "baz",
"other_col_name": "qux"
}
>>>>>>> Dev
]
```

##### Relationships

<<<<<<< HEAD
The data will include an array of related entry IDs:
```
your_relationships_field: [1, 2]
=======
The data will include an array of related data, including channel id, channel name, entry id, title, URL title, author id and username:

```
Expand All @@ -319,7 +287,6 @@ The data will include an array of related data, including channel id, channel na
"username": "Your author's username"
}
]
>>>>>>> Dev
```

##### Assets (not tested with JSON v2+)
Expand Down Expand Up @@ -598,8 +565,6 @@ function yourCallbackFunction(data) {

## Changelog

<<<<<<< HEAD
=======
### v2.6.0

- Added Fluid fieldtype support
Expand All @@ -611,15 +576,10 @@ function yourCallbackFunction(data) {
- Bugfix: where the `username` parameter didn't work
- Updated README

>>>>>>> Dev
### v.2.5.2

- Bugfix: Updated the `members` function to handle both legacy (pre EE4) and newer member data
- Added `json_pretty_print` parameter for better readable output. Handy in the development stage
<<<<<<< HEAD
- Code cleanup
=======
>>>>>>> Dev
- Updated README

### v2.5.1
Expand All @@ -641,10 +601,6 @@ function yourCallbackFunction(data) {
- Added relationships support for grids as per [ahebrank's](https://github.com/ahebrank) [commit](https://github.com/rsanchez/json/pull/65)
- Added `/system/user/addons/json/addon.setup.php` for EE3
- Added `/system/user/addons/json/README.md` for the add-on manual in the control panel (as of EE3)
<<<<<<< HEAD
=======
- **Note:** not tested with Assets, Matrix, Playa and Channel Files fieldtypes/modules
>>>>>>> Dev

## Attribution

Expand Down
Loading

0 comments on commit 9f87067

Please sign in to comment.