PINE LIBRARY
تم تحديثه json

Library "json"
JSON Easy Object Create/stringiffy
Functions to add/write JSON
============================================
obj
obj Object storage container/item
Fields:
key: (string ) item name
kind: (string ) item's type(for writing)
item: (string ) item (converted to string)
keys: (string[] ) keys of all sub-items and objects
items: (obj[] ) nested obj off individual subitems (for later...)
============================================
new(_name, _kind)
create multitype object
Parameters:
_name: (string) Name off object
_kind: (string) Preset Type (_OBJECT if a container item)
Returns: object container/item 2-in-1
============================================
add(_item, _obj, _key)
Set item to object obj item (same as set, prep for future Pine methods)
Parameters:
_item: ( int / float / bool / string )
_obj: (obj multi-type-item object)
_key: ( string )
set(_item, _obj, _key)
Set item to object obj item (same as add, prep for future Pine methods)
Parameters:
_item: ( int / float / bool / string )
_obj: (obj multi-type-item object)
_key: ( string )
addstore(_parent, _child)
Add a object as a subobject to storage (Future upgrade to write/edit)
Parameters:
_parent: to insert obj into
_child: to be inserted
setstore(_child, _parent)
Add a object as a subobject to storage (Future upgrade to write/edit)
Parameters:
_child: to be inserted
_parent: to insert obj into
add(_parent, _child)
Add a object as a string rendered item
Parameters:
_parent: to insert obj into
_child: to be inserted
set(_child, _parent)
Add a object as a string rendered item
Parameters:
_child: to be inserted
_parent: to insert obj into
============================================
write(_object, _key, _itemname)
Write object to string Object
Parameters:
_object: (obj)
_key: (array<(string/int)> )/(string)
_itemname: (string)
Returns: stringified flattened object.
clean_output(_str)
Clean JSON final output
Parameters:
_str: string json item
Returns: cleaned string
JSON Easy Object Create/stringiffy
Functions to add/write JSON
- new (name , kind) -> object
- set (_item , _obj , _key ) -> key index for parent object's array
- add (_obj , _key , _item ) -> key index for parent object's array
- write (object , kind ) -> stringified object // (enter kind to cut off key )
============================================
obj
obj Object storage container/item
Fields:
key: (string ) item name
kind: (string ) item's type(for writing)
item: (string ) item (converted to string)
keys: (string[] ) keys of all sub-items and objects
items: (obj[] ) nested obj off individual subitems (for later...)
============================================
new(_name, _kind)
create multitype object
Parameters:
_name: (string) Name off object
_kind: (string) Preset Type (_OBJECT if a container item)
Returns: object container/item 2-in-1
============================================
add(_item, _obj, _key)
Set item to object obj item (same as set, prep for future Pine methods)
Parameters:
_item: ( int / float / bool / string )
_obj: (obj multi-type-item object)
_key: ( string )
set(_item, _obj, _key)
Set item to object obj item (same as add, prep for future Pine methods)
Parameters:
_item: ( int / float / bool / string )
_obj: (obj multi-type-item object)
_key: ( string )
addstore(_parent, _child)
Add a object as a subobject to storage (Future upgrade to write/edit)
Parameters:
_parent: to insert obj into
_child: to be inserted
setstore(_child, _parent)
Add a object as a subobject to storage (Future upgrade to write/edit)
Parameters:
_child: to be inserted
_parent: to insert obj into
add(_parent, _child)
Add a object as a string rendered item
Parameters:
_parent: to insert obj into
_child: to be inserted
set(_child, _parent)
Add a object as a string rendered item
Parameters:
_child: to be inserted
_parent: to insert obj into
============================================
write(_object, _key, _itemname)
Write object to string Object
Parameters:
_object: (obj)
_key: (array<(string/int)> )/(string)
_itemname: (string)
Returns: stringified flattened object.
clean_output(_str)
Clean JSON final output
Parameters:
_str: string json item
Returns: cleaned string
ملاحظات الأخبار
v2MASSIVE!! single final function call for an output ..
No need to hard code your alert JSON's ever again!
think:
alert(write(_myalertData),frequency.once_per_bar)
Added:
format(_input)
Formats JSON for presentable output
Parameters:
_input: (string) json string
Returns: cleaned string
remove(obj, key)
Parameters:
obj
key
Updated:
new(_name, _kind)
create multitype object
@pparam _name (string) Name off object
@pparam _kind (string) Preset Type (_OBJECT if a container item)
Parameters:
_name
_kind
Returns: object container/item 2-in-1
write(_item)
Write object to string Object
// param _object (obj)
// param _key (array<(string/int)> )/(string)
// param _itemname (string)
Parameters:
_item
add(_Guardians, _child)
Parameters:
_Guardians
_child
set(_child, _Guardians)
Parameters:
_child
_Guardians
obj
obj Object storage container/item
Fields:
key: (string ) item name
kind: (string ) item's type(for writing)
item: (string ) item (converted to string)
keys: (string[] ) keys of all sub-items and objects
items: (obj[] ) nested obj off individual subitems (for later...)
flag
Removed:
clean_output(_str)
Clean JSON ffinal output
addstore(_parent, _child)
Add a object as a subobject to storage (Future upgrade to write/edit)
setstore(_child, _parent)
Add a object as a subobject to storage (Future upgrade to write/edit)
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.