我正在为像 jquery 一样工作的 javascript 搜索 css 解析器,例如:
var style = {
    '.test': {
        paddingTop: 20,
        height: 100,
        width: 100,
        borderRadius: 5
    },
    '.test2': {
        color: '#888'
    }
}
此 json 必须转换为:
.test{
    padding-top: 20px;
    height: 100px;
    width: 100px;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
}   
.test2 {
    color: #888;
}
谢谢!