question: JSONObject toRest ( ParseEncoder encoder ) { State state ; List < ParseOperationSet > operationSetQueueCopy ; synchronized ( mutex ) { state = getState ( ) ; int operationSetQueueSize = operationSetQueue . size ( ) ; operationSetQueueCopy = new ArrayList < > ( operationSetQueueSize ) ; for ( int i = 0 ; i < operationSetQueueSize ; i ++ ) { ParseOperationSet original = operationSetQueue . get ( i ) ; ParseOperationSet copy = new ParseOperationSet ( original ) ; operationSetQueueCopy . add ( copy ) ; } } return toRest ( state , operationSetQueueCopy , encoder ) ; }
target:  Convert to REST JSON for persisting in LDS.