Skip to content

NSNumber mapping error #46

Open
Open
@zhuangxq

Description

@zhuangxq
let json: Array<Dictionary<String, Any>> = [ [
		   "name": "KakaJSON",
		   "id" :  NSNumber(6664714503134970889),
		   "url": "https://github.com/kakaopensource/KakaJSON"
		   ] ,
			[
		  "name": "KakaJSON",
		  "id" :  6664714503134970881,
		  "url": "https://github.com/kakaopensource/KakaJSON"
		  ]]
	
let repo: [Repo] = json.kj.modelArray(type: Repo.self) as! [Repo]
for item in repo {
	print(item.id)
}

after mapping, first item is 6664714503134970880, second item is right

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions