feature #3366: create context data with the same format as the core

(cherry picked from commit 58b3f6bbebcd9621172b6c998077e75e43982315)