任何人都知道如何基于NSObject类序列化嵌套的JSON?有序列化JSON简单的讨论在这里,但它不是通用的,足以应付复杂的嵌套JSON.
想象一下这是JSON的结果:
{ "accounting" : [{ "firstName" : "John",
"lastName" : "Doe",
"age" : 23 },
{ "firstName" : "Mary",
"lastName" : "Smith",
"age" : 32 }
],
"sales" : [{ "firstName" : "Sally",
"lastName" : "Green",
"age" : 27 },
{ "firstName" : "Jim",
"lastName" : "Galley",
"age" : 41 }
]}
Run Code Online (Sandbox Code Playgroud)
从这堂课:
@interface Person : NSObject{}
@property (nonatomic, strong) NSString *firstName;
@property (nonatomic, strong) NSString *lastName;
@property (nonatomic, strong) NSNumber *age;
@end
@interface Department : NSObject{} …Run Code Online (Sandbox Code Playgroud) 我使用precise64盒子在Vagrant内部运行我的Laravel Web应用程序.
在vagrant box:在目录中/etc/apache2/sites-available,我有000-default.conf和laratest.conf文件.我现在才对此感兴趣laratest.conf.
在laratest.conf里面:
<VirtualHost *:80>
ServerName laratest.dev
ServerAlias www.laratest.dev
ServerAdmin webmaster@localhost
DocumentRoot /var/www/laratest/public
<Directory /var/www/laratest/public>
Options -Indexes +FollowSymLinks
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
在我的目录php.ini文件中/etc/php5/apache2/:
[xdebug]
zend_extension="./usr/lib/php5/some-number/xdebug.so"
xdebug.default_enable=1
xdebug.remote_log="/var/log/xdebug/xdebug.log"
xdebug.idekey="vagrant"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
Run Code Online (Sandbox Code Playgroud)
所以,我用laratest.devurl 访问我的laravel web
在PHPStorm -> Preferences -> Project Settings -> PHP -> Servers,下面的图像是我的设置:

我已经在PHP Debug Connection(电话图标)中启用了监听器并设置了一个断点.我运行网络时断点设法命中,但它给出了这个错误:

我的设置有什么问题吗?特别是映射.我已经尝试了很多东西和谷歌搜索,仍然无法正常调试