boonproject / boon

Simple opinionated Java for the novice to expert level Java Programmer. Low Ceremony. High Productivity.
http://richardhightower.github.io/site/Boon/Welcome.html
Apache License 2.0
522 stars 102 forks source link

Lage Primitive multidimensional Array to POJO #316

Open Carsten64 opened 9 years ago

Carsten64 commented 9 years ago

Hi, I tried to use your library to parse JSON response to POJO. But I received an error, when I tried to read a JSON Matrix of Integer with the dimension 300x300 e.g. {"matrix _table":[[10,15,15,14]], [[25,55,48,80]] }

And here is my snip of code:

        ObjectMapper mapper = JsonFactory.create();
        Reader reader = new InputStreamReader(con.getInputStream(), "UTF-8");
        Matrix testDT = mapper.readValue(reader, Matrix.class);
        puts("testDT",testDT);

public Matrix{ public int [][] matrix _table; }

as also here is my error messages:

Información: Con Exception: fieldName matrix _table of class class matrix had issues for value LIST for field FieldInfo [name=matrix_table, type=class [[I, parentType=class matrix] CAUSE org.boon.Exceptions$SoftenedException :: list args after conversion [0, 5692, 6333, 8281, 5078, 5624, 4093, 5852, 6077, 5672, 6045, 5701, 6297, 6109, 6358, 5150, 2567, 6220, 4910, 2518, 2518, 1913, 3198, 4818, 4872, 4503, 4724, 3850, 5421, 5937, 5115, 906, 5892, 6398, 5822, 5537, 6772, 6958, 7181, 6321, 5196, 3912, 5232, 5172, 6177, 7270, 6243, 2550, 2915, 2085, 5099, 3171, 5402, 4600, 7101, 3733, 7866, 4785, 4812, 4446, 5510, 4398, 5132, 8741, 4828, 7001, 2583, 2583, 7505, 6329, 6568, 6700, 5132, 7783, 5504, 5867, 5074, 6490, 5878, 5569, 5672, 6153, 6333, 5705, 6421, 6436, 2725, 7270, 8747, 2831, 5545, 8609, 5388, 3529, 5376, 5703, 4013, 4671, 4814, 8059, 5381, 7539, 5420, 7604, 4890, 6700, 7359, 7178, 4749, 5397, 1913, 6614, 5427, 5902, 6347, 5734, 6016, 5683, 5905, 5905, 5856, 6333, 6333, 4863, 7152, 6267, 3914, 1913, 5691, 1534, 4551, 5317, 4314, 8739, 4103, 5145, 8071, 5826, 4932, 3379, 3156, 4919, 5029, 5110, 7276, 5572, 5078, 5078, 5789, 5369, 5848, 5407, 5959, 3620, 5195, 4898, 4463, 10138, 8761, 5126, 6379, 5021, 6016, 5692, 5852, 5905, 5860, 5672, 6333, 6504, 6220, 6613, 2580, 5516, 2645, 2245, 2982, 7921, 7555, 5391, 5696, 8003, 5222, 1126, 5804, 7399, 9037, 4337, 8895, 8809, 2509, 10357, 5145, 5145, 5176, 5844, 5296, 3473, 3037, 5169, 5186, 6699, 6699, 4919, 4919, 5609, 5336, 4949, 4949, 4949, 6898, 5357, 2864, 5896, 5896, 5069, 5340, 5905, 5905, 5729, 5990, 6947, 5571, 2982, 3914, 6037, 2256, 8730, 5531, 5608, 10703, 4038, 6890, 5450, 6665, 5028, 5538, 5538, 6898, 5078, 5380, 6906, 5311, 5969, 5322, 4449, 4162, 4473, 4658, 5559, 5692, 5852, 5989, 5764, 5568, 5568, 5615, 6297, 5561, 6341, 6060, 6582, 5199, 1581, 9702, 8841, 5361, 7313, 9464, 2402, 4682, 5148, 5214, 4503, 7377, 4724, 10262, 10298, 7776, 5748, 6462, 4364, 9162, 4072, 5249, 5536, 5078, 5211, 4250, 7090, 5978, 4764, 5012, 5370, 5627, 5853, 6993, 4967, 4097, 5578, 5801, 5617] types [VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE] original args [0, 5692, 6333, 8281, 5078, 5624, 4093, 5852, 6077, 5672, 6045, 5701, 6297, 6109, 6358, 5150, 2567, 6220, 4910, 2518, 2518, 1913, 3198, 4818, 4872, 4503, 4724, 3850, 5421, 5937, 5115, 906, 5892, 6398, 5822, 5537, 6772, 6958, 7181, 6321, 5196, 3912, 5232, 5172, 6177, 7270, 6243, 2550, 2915, 2085, 5099, 3171, 5402, 4600, 7101, 3733, 7866, 4785, 4812, 4446, 5510, 4398, 5132, 8741, 4828, 7001, 2583, 2583, 7505, 6329, 6568, 6700, 5132, 7783, 5504, 5867, 5074, 6490, 5878, 5569, 5672, 6153, 6333, 5705, 6421, 6436, 2725, 7270, 8747, 2831, 5545, 8609, 5388, 3529, 5376, 5703, 4013, 4671, 4814, 8059, 5381, 7539, 5420, 7604, 4890, 6700, 7359, 7178, 4749, 5397, 1913, 6614, 5427, 5902, 6347, 5734, 6016, 5683, 5905, 5905, 5856, 6333, 6333, 4863, 7152, 6267, 3914, 1913, 5691, 1534, 4551, 5317, 4314, 8739, 4103, 5145, 8071, 5826, 4932, 3379, 3156, 4919, 5029, 5110, 7276, 5572, 5078, 5078, 5789, 5369, 5848, 5407, 5959, 3620, 5195, 4898, 4463, 10138, 8761, 5126, 6379, 5021, 6016, 5692, 5852, 5905, 5860, 5672, 6333, 6504, 6220, 6613, 2580, 5516, 2645, 2245, 2982, 7921, 7555, 5391, 5696, 8003, 5222, 1126, 5804, 7399, 9037, 4337, 8895, 8809, 2509, 10357, 5145, 5145, 5176, 5844, 5296, 3473, 3037, 5169, 5186, 6699, 6699, 4919, 4919, 5609, 5336, 4949, 4949, 4949, 6898, 5357, 2864, 5896, 5896, 5069, 5340, 5905, 5905, 5729, 5990, 6947, 5571, 2982, 3914, 6037, 2256, 8730, 5531, 5608, 10703, 4038, 6890, 5450, 6665, 5028, 5538, 5538, 6898, 5078, 5380, 6906, 5311, 5969, 5322, 4449, 4162, 4473, 4658, 5559, 5692, 5852, 5989, 5764, 5568, 5568, 5615, 6297, 5561, 6341, 6060, 6582, 5199, 1581, 9702, 8841, 5361, 7313, 9464, 2402, 4682, 5148, 5214, 4503, 7377, 4724, 10262, 10298, 7776, 5748, 6462, 4364, 9162, 4072, 5249, 5536, 5078, 5211, 4250, 7090, 5978, 4764, 5012, 5370, 5627, 5853, 6993, 4967, 4097, 5578, 5801, 5617] original types [VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VA Información: LUE, VALUE, VALUE, VALUE, VALUE, VALUE] CAUSE org.boon.Exceptions$SoftenedException :: Unable to convert list [0, 5692, 6333, 8281, 5078, 5624, 4093, 5852, 6077, 5672, 6045, 5701, 6297, 6109, 6358, 5150, 2567, 6220, 4910, 2518, 2518, 1913, 3198, 4818, 4872, 4503, 4724, 3850, 5421, 5937, 5115, 906, 5892, 6398, 5822, 5537, 6772, 6958, 7181, 6321, 5196, 3912, 5232, 5172, 6177, 7270, 6243, 2550, 2915, 2085, 5099, 3171, 5402, 4600, 7101, 3733, 7866, 4785, 4812, 4446, 5510, 4398, 5132, 8741, 4828, 7001, 2583, 2583, 7505, 6329, 6568, 6700, 5132, 7783, 5504, 5867, 5074, 6490, 5878, 5569, 5672, 6153, 6333, 5705, 6421, 6436, 2725, 7270, 8747, 2831, 5545, 8609, 5388, 3529, 5376, 5703, 4013, 4671, 4814, 8059, 5381, 7539, 5420, 7604, 4890, 6700, 7359, 7178, 4749, 5397, 1913, 6614, 5427, 5902, 6347, 5734, 6016, 5683, 5905, 5905, 5856, 6333, 6333, 4863, 7152, 6267, 3914, 1913, 5691, 1534, 4551, 5317, 4314, 8739, 4103, 5145, 8071, 5826, 4932, 3379, 3156, 4919, 5029, 5110, 7276, 5572, 5078, 5078, 5789, 5369, 5848, 5407, 5959, 3620, 5195, 4898, 4463, 10138, 8761, 5126, 6379, 5021, 6016, 5692, 5852, 5905, 5860, 5672, 6333, 6504, 6220, 6613, 2580, 5516, 2645, 2245, 2982, 7921, 7555, 5391, 5696, 8003, 5222, 1126, 5804, 7399, 9037, 4337, 8895, 8809, 2509, 10357, 5145, 5145, 5176, 5844, 5296, 3473, 3037, 5169, 5186, 6699, 6699, 4919, 4919, 5609, 5336, 4949, 4949, 4949, 6898, 5357, 2864, 5896, 5896, 5069, 5340, 5905, 5905, 5729, 5990, 6947, 5571, 2982, 3914, 6037, 2256, 8730, 5531, 5608, 10703, 4038, 6890, 5450, 6665, 5028, 5538, 5538, 6898, 5078, 5380, 6906, 5311, 5969, 5322, 4449, 4162, 4473, 4658, 5559, 5692, 5852, 5989, 5764, 5568, 5568, 5615, 6297, 5561, 6341, 6060, 6582, 5199, 1581, 9702, 8841, 5361, 7313, 9464, 2402, 4682, 5148, 5214, 4503, 7377, 4724, 10262, 10298, 7776, 5748, 6462, 4364, 9162, 4072, 5249, 5536, 5078, 5211, 4250, 7090, 5978, 4764, 5012, 5370, 5627, 5853, 6993, 4967, 4097, 5578, 5801, 5617] into class [I

Did I do an error? Kind regards

Carsten