L
L
Lomoson2015-08-20 13:05:01
Yii
Lomoson, 2015-08-20 13:05:01

Why does Yii2 cast string to type integer in REST?

Faced with the fact that instead of "id": 293returning Json "id": "293".
Tell me, please, how to deal with this? If I explicitly cast id to int in the model, then everything is good, but this is not an option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LittleFatNinja, 2015-08-20
@LittleFatNinja

yuzayintval()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question