Model & JSON is back

YYModel

YYModel_sequence
YYModel

YYClassInfo

<<< all base on runtime method
YYClassIvarInfo - encap Ivar
-initWithIvar
YYClassMethodInfo - encap Method
-initWithMethod
YYClassPropertyInfo - encap objc_property_t(Type encoding)
-initWithProperty
YYClassInfo - encap Ivar、Method、property by class
+classInfoWithClass

NSObject+YYModel

All convenient inline method for Foundation class c number number value date NSDateFormatter multi key-value


Both for custom like AOP method, ex: +modelCustomPropertyMapper & +modelContainerPropertyGenericClass

_YYModelPropertyMeta - YYClassPropertyInfo wrapper
-metaWithClassInfo

_YYModelMeta - YYClassInfo wrapper
+metaWithClass - cache + dispatch_semaphore


\c - inline ModelCreateNumberFromProperty
\c - inline ModelSetNumberToProperty

————————

\c - ModelSetValueForProperty

\c - ModelSetWithDictionaryFunction
\c - ModelSetWithPropertyMetaArrayFunction

\c - ModelToJSONObjectRecursive
\c - ModelDescriptionAddIndent
\c - ModelDescription


NSObject (YYModel)

+modelWithJSON
+modelWithDictionary - _YYModelMeta
-modelSetWithJSON
-modelSetWithDictionary - ModelSetContext(_YYModelMeta/self/dic) -> CFArrayApplyFunction

-modelToJSONObject
-modelToJSONData
-modelToJSONString

NSArray (YYModel)
+modelArrayWithClass:(json:/array:)

NSDictionary (YYModel)
+modelDictionaryWithClass:(json:/dictionary:)

YYModel <NSObject> - for protocol convert

MJExtension

MJExtension_sequence
MJExtension

MJExtensionConst - const type coding str
MJFoundation - isClassFromFoundation

MJProperty

  • cachedPropertyWithProperty: (_name+MJPropertyType)
    + 多级映射 key, like [[MJPropertyKey]], [[[MJPropertyKey], [MJPropertyKey]]]
    + (AssociatedObject cache)

MJPropertyKey
-name
-valueInObject:(NSMutableDictionary cache)

MJPropertyType
+cachedTypeWithCode

NSObject (MJClass) - white/black list cache

+mj_enumerateClasses - callback classBlock exclusive FoundationClass
+mj_enumerateAllClasses - callback classBlock

+mj_setupBlockReturnValue - AssociatedObj cache block return
+mj_setupAllowedPropertyNames
+mj_setupIgnoredPropertyNames
+mj_setupAllowedCodingPropertyNames
+mj_setupIgnoredCodingPropertyNames

+mj_totalObjectsWithSelector - get cache arr by SEL return - performSelector return
+mj_totalAllowedPropertyNames
+mj_totalIgnoredPropertyNames
+mj_totalAllowedCodingPropertyNames
+mj_totalIgnoredCodingPropertyNames

NSObject (MJProperty)

+mj_enumerateProperties - callback block
+properties - cachedProperties(MJProperty)
+propertyKey - AOP method & block return
+propertyObjectClassInArray - AOP method & block return

+mj_setupNewValueFromOldValue - AssociatedObj cache
+mj_getNewValueFromObject - AOP or cacheBlock return

// AssociatedObj cache
+mj_setupReplacedKeyFromPropertyName
+mj_setupReplacedKeyFromPropertyName121
+mj_setupObjectClassInArray

NSObject+MJKeyValue

MJKeyValue <NSObject>
-all AOP method

NSObject (MJKeyValue) <MJKeyValue>

Dict->model
-mj_setKeyValues - mj_enumerateProperties(custom class&DictArr&pro)
+mj_objectWithKeyValues - instantiate
+mj_objectArrayWithKeyValuesArray - 拆分-mj_objectWithKeyValues

Model->Dict
-mj_keyValuesWithKeys - mj_enumerateProperties(custom class&DictArr&pro)
+mj_keyValuesArrayWithObjectArray - 拆分-mj_keyValuesWithKeys

-mj_JSONObject

最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容