Yes, it looks similar, but there are 2 differences there:
1. 3 fields name different: password => passed, proxy => httpProxyHost, port => httpProxyPort.
2. The type should not be duplicated, look at the  https://github.com/mozilla-b2g/gaia/blob/master/shared/resources/apn.json#L2454, you may find line 2454 is covered by line 2455. So we still need to iterate them.

So, I use another way, looking more simple, to implement it.