
This module may still buggy, make a pull request or make an issue if you found them.

Highly inspired with styled-components style.This module may have some limitation based on reserved naming of the methods and properties.
#Json helper js license
This project is licensed under the MIT License - see the LICENSE.md file for details Acknowledgments Aditya Kresna Permana - Indonesia - SlaveOfCode.There are 8 other projects in the npm registry using json-helpers. Start using json-helpers in your project by running npm i json-helpers. Latest version: 5.2.1, last published: 5 months ago. The result including the function and properties to do parse inside the module JSON stringify/parser managing 'undefined, Date and Buffer. To get the real struct schema from the instance. The dirty schema of the struct which used internally to parse valueĪ container of all enum values on the struct, this property only available when we set some property with ENUM type. The id of struct, every struct has an unique id generated based on shortid library To check if the struct is a child of the given struct Schema of struct, you could inspect this property after defining the struct. Nothing special about this, just used to to identify JKT struct on internal parser. You shouldn't use the following reserved words as a property for your struct, because it was reserved to support the module. These are detailed function & properties you could use when using jkt struct. > See the result on RunKit Struct & Instance References Name->full_name: String // mapping from source key (name) to new key (full_name)Īddress->address2: String // mapping from source key (address) to new key (address2)Īge->ageInString: String // mapping from source key (age) to new key (ageInString) with type String By this point you got a very reusable component as you may need the same structure on another struct (eg. Nested StructĮvery single struct we define is an independent structure that could be used with another struct. You can assume the Person as a structure for json data, then every time you do parsing, you just have to pass an argument into Person.Ĭonst TSize = jkt.ENUM`small, medium, large, extra_large: $.
#Json helper js iso
Numeric type value, works for either Integer or Floatīoolean type value, works for either Integer or Floatĭate type value that accept ISO 8601, supported by Moment and it is timezone aware (will convert to UTC time) based on your machine timezoneįorce to only accept valid date value and will produce timezone aware dateĭate type value that accept ISO 8601, supported by Moment and it is not timezone awareįorce to only accept valid date value and will not produce timezone aware date Most PHP installations include handy JSON functions such as encodejson and decodejson, which allows developers to easily generate JSON data to pass through. Basically JKT really depends on ES6 style which using template literal in practice. To use JKT you need a NodeJS version 6.4.0 and up. It's basically just a simple parser to handle property types, the structure and provide a small helper to handle the data. JKT is a simple Javascript module to create a structure for your JSON. Then I do research and no one module is available to fit in with my case, so I built this one. var helper require('./helpers/lib.js') The same also applies when you use the ES modules format as follows: import helper from './helpers/lib.mjs' To conclude, the error Cannot find module happens when Node.

So confusing when every time I checking up the right parameters to my function, make sure the produced JSON data are valid and parsing all over the JSON properties to follow my rules (types). I haven’t found the particleHelper file, yet, have I?Īnyway… var sun = new ("sun", scene).UPDATE: Take a look at Podeng a similar parser like JKT with richer features, go visit the project hereĪt the first time I wonder how could I make my JSON to be more manageable.
