Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kotlinx.serialization | 4,533 | 112 | 10 hours ago | 15 | August 18, 2022 | 343 | apache-2.0 | Kotlin | ||
Kotlin multiplatform / multi-format serialization | ||||||||||
Jsontokotlinclass | 2,750 | 6 months ago | 2 | August 13, 2022 | 34 | gpl-3.0 | Kotlin | |||
🚀 Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin ) | ||||||||||
Dprint | 1,925 | 12 | a day ago | 89 | June 29, 2022 | 52 | mit | Rust | ||
Pluggable and configurable code formatting platform written in Rust. | ||||||||||
Kunpeng | 1,454 | a year ago | 21 | apache-2.0 | Go | |||||
kunpeng是一个Golang编写的开源POC框架/库,以动态链接库的形式提供各种语言调用,通过此项目可快速开发漏洞检测类的系统。 | ||||||||||
Bludit | 1,111 | a month ago | 50 | mit | JavaScript | |||||
Simple, Fast, Secure, Flat-File CMS | ||||||||||
Wal2json | 1,055 | 4 months ago | 1 | March 03, 2021 | 21 | bsd-3-clause | C | |||
JSON output plugin for changeset extraction | ||||||||||
Mobility | 890 | 30 | 10 | 3 days ago | 87 | June 24, 2022 | 34 | mit | Ruby | |
Pluggable Ruby translation framework | ||||||||||
Json Viewer | 636 | 22 days ago | 17 | mit | C++ | |||||
A JSON viewer plugin for Notepad++. Displays the selected JSON string in a tree view. | ||||||||||
Flexijsoneditor | 534 | 4 years ago | 5 | May 21, 2018 | 18 | other | JavaScript | |||
JSON editor jQuery plugin | ||||||||||
Sublimetext_indentxml | 519 | 5 years ago | 26 | mit | Python | |||||
Plugin for Sublime Text editor for reindenting XML and JSON files |
This Bookshelf.js plugin enables you to define which model columns have JSON format, preventing manual hook definition for each model with JSON columns.
Install the package via npm
:
$ npm install --save bookshelf-json-columns
Require and register the bookshelf-json-columns plugin:
var bookshelf = require('bookshelf')(knex);
var jsonColumns = require('bookshelf-json-columns');
bookshelf.plugin(jsonColumns);
Define which columns have JSON format with the jsonColumns
class property:
bookshelf.Model.extend({
tableName: 'foo'
}, {
jsonColumns: ['bar', 'biz']
});
If you're using ES6 class syntax, define jsonColumns
as static property:
class Model extends bookshelf.Model {
get tableName() {
return 'foo';
}
static jsonColumns = ['bar', 'biz'];
}
This plugin extends the initialize
and save
methods of Bookshelf's Model
, so if you are also extending or overriding them on your models make sure to call their prototype after your work is done:
bookshelf.Model.extend({
initialize: function() {
// Do some stuff.
store.addModel(this);
// Call the `initialize` prototype method.
bookshelf.Model.prototype.initialize.apply(this, arguments);
},
save: function() {
// Do some stuff.
store.validateModel(this);
// Call the `save` prototype method.
bookshelf.Model.prototype.save.apply(this, arguments);
},
tableName: 'foo'
}, {
jsonColumns: ['bar', 'biz']
});
Contributions are welcome and greatly appreciated, so feel free to fork this repository and submit pull requests.
bookshelf-json-columns supports PostgreSQL, SQLite3 and MySQL. You can find test suites for all these database engines in the test folder.
$ npm test
bookshelf-json-columns enforces linting using ESLint with the Seegno-flavored ESLint config. We recommend you to install an eslint plugin in your editor of choice, although you can run the linter anytime with:
$ eslint src test
Please follow these advices to simplify the pull request workflow: