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oAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACGUlEQVR4nI2OPWgTcRiHf/9L7isftmkbU/PRYg/LgaI4CBWKCkoCSqVgRTqo6OIgOrgpgojUyUHwA1xEHIUKNggq1ASili6G1sXUVE0ThV4vmNSD3l3u7u/SgGlszG9+nud9gTY2LUkv3sny1XbYpr0ZOX7/LkAfBwL0rSR9yshysG3Z/vxgaP7rAk1en6B3APrI66WT4TDNStLROsO0ChCjmOzLjWPfmSBGc8tAMISfioJipbK3zrg2k2n+9tPKj9n9hq7A+v4ErDWHyLVXoLpVGElPn2j5AV2cSFRL2dOmXgRgAXwXuJoKXyYC+cJQ4m+2KVB4fZE3Vr5NGdV5uLmtqJkKRP9u2LXfCHVxl6VdJ3MtA33buJdVdYZzi/2wzBUI3kE41ISHXf3gOqLd28g3BOjClfPl0sxhAhYM2wECCrcQA7FUqlaR2Cg3BRxLumk7Bjzdw7D0JQj+PbBNBd1b6NjAuKL9N2Ax3ii/4wYsPgSO64XjaOgQ9Uly4Mvzf8kNgYe3znm5QCcYxoGrZxiuwUvgeWjswY9jm8kN6+8L7zw1eohWF5PUWH5PqZl/ppZme9qSASAaix0TPT4aDfdOlQuZSLseAYBUKrU9nU6fZRjGPSBJc7Wa7REF3ieKgrjOrQFYI4RQAKuEkF+CICzF4/G8GwBUVfXLspwF0GnbdphjXaxtWz5N0+h6wAdAA2DVj+q6XgaAP108zDR5BRdpAAAAAElFTkSuQmCC"
}]
}
我通过邮递员传递数组(POST)。如何在MVC WEB API中读取数组的值。
答案 0 :(得分:0)
public class Test
{
public MyImage myImage{get;set;}
}
public class MyImage
{
public List<string> Image{get;set;}
}
使用类似的方法并调用Test()在post方法中作为参数 并且还将图像数据放在花括号中,因为json使用键值对。
希望它能奏效。